18 行
811 B
TypeScript
18 行
811 B
TypeScript
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
import Model from 'flarum/common/Model';
|
|
export default class Round extends Model {
|
|
constructor() {
|
|
super(...arguments);
|
|
_defineProperty(this, "name", Model.attribute('name'));
|
|
_defineProperty(this, "starts_at", Model.attribute('starts_at'));
|
|
_defineProperty(this, "ends_at", Model.attribute('ends_at'));
|
|
_defineProperty(this, "include_starting_pack", Model.attribute('include_starting_pack'));
|
|
_defineProperty(this, "my_catch_count", Model.attribute('my_catch_count'));
|
|
_defineProperty(this, "myRanking", Model.hasOne('myRanking'));
|
|
}
|
|
apiEndpoint() {
|
|
return '/catch-the-fish/rounds' + (this.exists ? '/' + this.data.id : '');
|
|
}
|
|
}
|
|
flarum.reg.add('xxb-catch-the-fish', 'forum/models/Round', Round);
|