mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 17:23:21 +03:00
refactor: database types (#19624)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user