You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
439 B

const AV = require('../lib/av-live-query-weapp-min');
class Class extends AV.Object{
get name(){
return this.get("name");
}
set name(value){
this.set("name", value);
}
get students(){
return this.get("students");
}
add_student(user){
this.addUnique("students", user.id);
}
del_student(user){
let students = this.get("students");
if(user.id in students){
this.remove(user.id);
}
}
}