mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-11 11:51:36 +00:00
added star rating to comments
This commit is contained in:
parent
396ecfff4a
commit
5fe3fd7f76
5 changed files with 210 additions and 72 deletions
|
|
@ -13,6 +13,14 @@ class Comment extends Model {
|
|||
type: DataTypes.TEXT,
|
||||
allowNull: false
|
||||
},
|
||||
rating: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: true,
|
||||
validate: {
|
||||
min: 1,
|
||||
max: 5
|
||||
}
|
||||
},
|
||||
libraryItemId: {
|
||||
type: DataTypes.UUID,
|
||||
allowNull: false,
|
||||
|
|
@ -68,6 +76,7 @@ class Comment extends Model {
|
|||
return {
|
||||
id: this.id,
|
||||
text: this.text,
|
||||
rating: this.rating,
|
||||
userId: this.userId,
|
||||
libraryItemId: this.libraryItemId,
|
||||
createdAt: this.createdAt,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue