make genres private
This commit is contained in:
parent
f5f7f21ae6
commit
26d8dd1ec3
|
@ -2,6 +2,7 @@ import Entity from "./Entity.mjs";
|
||||||
import dataValidation from "./dataValidation.mjs";
|
import dataValidation from "./dataValidation.mjs";
|
||||||
//THIS CLASS WILL HANDLE JUNCTION TABLE STUFF
|
//THIS CLASS WILL HANDLE JUNCTION TABLE STUFF
|
||||||
export default class Title extends Entity{
|
export default class Title extends Entity{
|
||||||
|
#genres
|
||||||
set _title(prop){
|
set _title(prop){
|
||||||
if(prop){
|
if(prop){
|
||||||
if(!dataValidation.isString(prop)){throw new TypeError("title must be a string")}
|
if(!dataValidation.isString(prop)){throw new TypeError("title must be a string")}
|
||||||
|
@ -10,8 +11,8 @@ export default class Title extends Entity{
|
||||||
}
|
}
|
||||||
set _genres(prop){
|
set _genres(prop){
|
||||||
if(prop){
|
if(prop){
|
||||||
//if(!dataValidation.isObject(prop)){throw new TypeError("genres must be an object")}
|
if(!dataValidation.isObject(prop)){throw new TypeError(`genres must be an object; this is a ${typeof prop}`)}
|
||||||
this.genres=prop
|
this.#genres=prop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set _deleted(prop){
|
set _deleted(prop){
|
||||||
|
@ -21,6 +22,9 @@ export default class Title extends Entity{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
get genres(){
|
||||||
|
return this.#genres
|
||||||
|
}
|
||||||
|
|
||||||
constructor(data){
|
constructor(data){
|
||||||
super(data)
|
super(data)
|
||||||
|
|
BIN
submissions
BIN
submissions
Binary file not shown.
Loading…
Reference in New Issue