1
0
mirror of https://github.com/advplyr/audiobookshelf.git synced 2025-01-13 00:06:30 +01:00
audiobookshelf/server/objects/entities/Series.js

40 lines
711 B
JavaScript
Raw Normal View History

2022-03-09 02:31:44 +01:00
class Series {
constructor(series) {
this.id = null
this.name = null
this.sequence = null
this.addedAt = null
this.updatedAt = null
if (series) {
this.construct(series)
}
}
construct(series) {
this.id = series.id
this.name = series.name
this.sequence = series.sequence
this.addedAt = series.addedAt
this.updatedAt = series.updatedAt
}
toJSON() {
return {
id: this.id,
name: this.name,
sequence: this.sequence,
addedAt: this.addedAt,
updatedAt: this.updatedAt
}
}
toJSONMinimal() {
return {
id: this.id,
name: this.name,
sequence: this.sequence
}
}
}
module.exports = Series