mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-04 02:05:06 +02:00
New data model authors routes
This commit is contained in:
parent
65df377a49
commit
dad12537b6
6 changed files with 102 additions and 65 deletions
|
@ -5,6 +5,7 @@ class Author {
|
|||
this.id = null
|
||||
this.asin = null
|
||||
this.name = null
|
||||
this.description = null
|
||||
this.imagePath = null
|
||||
this.relImagePath = null
|
||||
this.addedAt = null
|
||||
|
@ -19,6 +20,7 @@ class Author {
|
|||
this.id = author.id
|
||||
this.asin = author.asin
|
||||
this.name = author.name
|
||||
this.description = author.description || null
|
||||
this.imagePath = author.imagePath
|
||||
this.relImagePath = author.relImagePath
|
||||
this.addedAt = author.addedAt
|
||||
|
@ -30,6 +32,7 @@ class Author {
|
|||
id: this.id,
|
||||
asin: this.asin,
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
imagePath: this.imagePath,
|
||||
relImagePath: this.relImagePath,
|
||||
addedAt: this.addedAt,
|
||||
|
@ -47,6 +50,7 @@ class Author {
|
|||
setData(data) {
|
||||
this.id = getId('aut')
|
||||
this.name = data.name
|
||||
this.description = data.description || null
|
||||
this.asin = data.asin || null
|
||||
this.imagePath = data.imagePath || null
|
||||
this.relImagePath = data.relImagePath || null
|
||||
|
|
|
@ -4,6 +4,7 @@ class Series {
|
|||
constructor(series) {
|
||||
this.id = null
|
||||
this.name = null
|
||||
this.description = null
|
||||
this.addedAt = null
|
||||
this.updatedAt = null
|
||||
|
||||
|
@ -15,6 +16,7 @@ class Series {
|
|||
construct(series) {
|
||||
this.id = series.id
|
||||
this.name = series.name
|
||||
this.description = series.description || null
|
||||
this.addedAt = series.addedAt
|
||||
this.updatedAt = series.updatedAt
|
||||
}
|
||||
|
@ -23,6 +25,7 @@ class Series {
|
|||
return {
|
||||
id: this.id,
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
addedAt: this.addedAt,
|
||||
updatedAt: this.updatedAt
|
||||
}
|
||||
|
@ -39,6 +42,7 @@ class Series {
|
|||
setData(data) {
|
||||
this.id = getId('ser')
|
||||
this.name = data.name
|
||||
this.description = data.description || null
|
||||
this.addedAt = Date.now()
|
||||
this.updatedAt = Date.now()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue