sub-manager-backend/objects/Story.mjs

16 lines
413 B
JavaScript
Raw Normal View History

2023-09-07 09:39:09 +00:00
import Title from "./Title.mjs"
export default class Story extends Title{
2023-09-07 10:07:34 +00:00
set _word_count(prop){
if(prop){
2023-09-11 10:04:09 +00:00
if(!Number.isInteger(Number(prop))){throw new TypeError("word_count must be integer!")}
2023-09-07 10:07:34 +00:00
this.word_count=prop
}
}
2023-09-09 14:04:53 +00:00
get table(){
return 'stories'
}
2023-09-07 09:39:09 +00:00
constructor(data){
super(data)
2023-09-07 10:07:34 +00:00
this._word_count=data?.word_count
2023-09-07 09:39:09 +00:00
}
}