Database Schema
User
IUserModel
ts
export interface IUserModel {
id: number
username: string
password: string
fullname: string | null
avatar: string | null
is_admin: boolean
created_at: Date
bookmarks?: IBookmarkModel[]
collections?: ICollectionModel[]
tags?: ITagModel[]
}export interface IUserModel {
id: number
username: string
password: string
fullname: string | null
avatar: string | null
is_admin: boolean
created_at: Date
bookmarks?: IBookmarkModel[]
collections?: ICollectionModel[]
tags?: ITagModel[]
}Bookmark
IBookmarkModel
ts
export interface IBookmarkModel {
id: number
author_id: number
collection_id: number
name: string
url: string
description: string
icon: string
created_at: Date
author?: IUserModel
collection?: ICollectionModel
tags?: ITagModel[]
}export interface IBookmarkModel {
id: number
author_id: number
collection_id: number
name: string
url: string
description: string
icon: string
created_at: Date
author?: IUserModel
collection?: ICollectionModel
tags?: ITagModel[]
}IBookmarkMetaModel
ts
export interface IBookmarkMetaModel {
name: string
description: string
icon: string
}export interface IBookmarkMetaModel {
name: string
description: string
icon: string
}Collection
ICollectionModel
ts
export interface ICollectionModel {
id: number
author_id: number
name: string
icon: string
created_at: Date
author?: IUserModel
bookmarks?: IBookmarkModel[]
}export interface ICollectionModel {
id: number
author_id: number
name: string
icon: string
created_at: Date
author?: IUserModel
bookmarks?: IBookmarkModel[]
}Tag
ITagModel
ts
export interface ITagModel {
id: number
author_id: number
name: string
author?: IUserModel
bookmarks?: IBookmarkModel[]
}export interface ITagModel {
id: number
author_id: number
name: string
author?: IUserModel
bookmarks?: IBookmarkModel[]
}