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

22 lines
454 B
TypeScript

import { Collection, FieldTypes, Policies } from "sealious";
export default class Tasks extends Collection {
fields = {
title: new FieldTypes.Text(),
done: new (class extends FieldTypes.Boolean {
hasDefaultValue = () => true;
async getDefaultValue() {
return false;
}
})(),
};
policies = {
create: new Policies.Public(),
show: new Policies.Owner(),
list: new Policies.Owner(),
};
defaultPolicy = new Policies.Public();
}