mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
refactor: database types (#19624)
This commit is contained in:
parent
09cbc5d3f4
commit
e60bc3c304
99 changed files with 518 additions and 889 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { Selectable } from 'kysely';
|
||||
import { Albums, Exif as DatabaseExif } from 'src/db';
|
||||
import { MapAsset } from 'src/dtos/asset-response.dto';
|
||||
import {
|
||||
AlbumUserRole,
|
||||
|
|
@ -13,6 +12,8 @@ import {
|
|||
UserAvatarColor,
|
||||
UserStatus,
|
||||
} from 'src/enum';
|
||||
import { AlbumTable } from 'src/schema/tables/album.table';
|
||||
import { ExifTable } from 'src/schema/tables/exif.table';
|
||||
import { UserMetadataItem } from 'src/types';
|
||||
|
||||
export type AuthUser = {
|
||||
|
|
@ -193,7 +194,7 @@ export type SharedLink = {
|
|||
userId: string;
|
||||
};
|
||||
|
||||
export type Album = Selectable<Albums> & {
|
||||
export type Album = Selectable<AlbumTable> & {
|
||||
owner: User;
|
||||
assets: MapAsset[];
|
||||
};
|
||||
|
|
@ -239,7 +240,7 @@ export type Session = {
|
|||
pinExpiresAt: Date | null;
|
||||
};
|
||||
|
||||
export type Exif = Omit<Selectable<DatabaseExif>, 'updatedAt' | 'updateId'>;
|
||||
export type Exif = Omit<Selectable<ExifTable>, 'updatedAt' | 'updateId'>;
|
||||
|
||||
export type Person = {
|
||||
createdAt: Date;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue