monoid
8fece9090f
다시 작업. 디자인도 바꾸고 서버도 바꿈. Co-authored-by: monoid <jaeung@prelude.duckdns.org> Reviewed-on: https://git.prelude.duckdns.org/monoid/ionian/pulls/6
54 lines
1.0 KiB
TypeScript
54 lines
1.0 KiB
TypeScript
import type { ColumnType } from "kysely";
|
|
|
|
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
|
|
? ColumnType<S, I | undefined, U>
|
|
: ColumnType<T, T | undefined, T>;
|
|
|
|
export interface DocTagRelation {
|
|
doc_id: number;
|
|
tag_name: string;
|
|
}
|
|
|
|
export interface Document {
|
|
additional: string | null;
|
|
basepath: string;
|
|
content_hash: string | null;
|
|
content_type: string;
|
|
created_at: number;
|
|
deleted_at: number | null;
|
|
filename: string;
|
|
id: Generated<number>;
|
|
modified_at: number;
|
|
title: string;
|
|
}
|
|
|
|
export interface Permissions {
|
|
name: string;
|
|
username: string;
|
|
}
|
|
|
|
export interface SchemaMigration {
|
|
dirty: number | null;
|
|
version: string | null;
|
|
}
|
|
|
|
export interface Tags {
|
|
description: string | null;
|
|
name: string;
|
|
}
|
|
|
|
export interface Users {
|
|
password_hash: string;
|
|
password_salt: string;
|
|
username: string | null;
|
|
}
|
|
|
|
export interface DB {
|
|
doc_tag_relation: DocTagRelation;
|
|
document: Document;
|
|
permissions: Permissions;
|
|
schema_migration: SchemaMigration;
|
|
tags: Tags;
|
|
users: Users;
|
|
}
|