mirror of https://github.com/msgbyte/tailchat
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.
21 lines
535 B
TypeScript
21 lines
535 B
TypeScript
import { db } from 'tailchat-server-sdk';
|
|
const { getModelForClass, prop, modelOptions, TimeStamps } = db;
|
|
|
|
@modelOptions({
|
|
options: {
|
|
customName: 'p_{{pickPluginName id}}',
|
|
},
|
|
})
|
|
export class {{pickPluginNameUp id}} extends TimeStamps implements db.Base {
|
|
_id: db.Types.ObjectId;
|
|
id: string;
|
|
}
|
|
|
|
export type {{pickPluginNameUp id}}Document = db.DocumentType<{{pickPluginNameUp id}}>;
|
|
|
|
const model = getModelForClass({{pickPluginNameUp id}});
|
|
|
|
export type {{pickPluginNameUp id}}Model = typeof model;
|
|
|
|
export default model;
|