24 lines
558 B
TypeScript
24 lines
558 B
TypeScript
import DB from "../database";
|
|
import { ModelDataBase } from "@hibas123/safe_mongo/lib/model";
|
|
import { ObjectID } from "mongodb";
|
|
import { v4 } from "uuid";
|
|
|
|
export interface IPermission extends ModelDataBase {
|
|
name: string;
|
|
description: string;
|
|
client: ObjectID;
|
|
}
|
|
|
|
const Permission = DB.addModel<IPermission>({
|
|
name: "permission",
|
|
versions: [{
|
|
migration: () => { },
|
|
schema: {
|
|
name: { type: String },
|
|
description: { type: String },
|
|
client: { type: ObjectID }
|
|
}
|
|
}]
|
|
})
|
|
|
|
export default Permission; |