2024-03-26 23:58:26 +09:00
|
|
|
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;
|
2024-03-29 00:19:36 +09:00
|
|
|
name: string;
|
2024-03-26 23:58:26 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|