Page MenuHomeSealhub

collection.ts
No OneTemporary

collection.ts

import { toPascalCase } from "js-convert-case";
export function collectionTemplate(
collection_name: string,
fields_string = `content: new FieldTypes.Text(),`
) {
return `import { Collection, FieldTypes, Policies } from "sealious";
export default class ${toPascalCase(collection_name)} extends Collection {
fields = {
${fields_string}
};
defaultPolicy = new Policies.Public();
}
`;
}

File Metadata

Mime Type
text/x-java
Expires
Fri, Jan 24, 15:15 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
599337
Default Alt Text
collection.ts (392 B)

Event Timeline