OpenAuth_server/src/models/mail.ts

25 lines
504 B
TypeScript
Raw Normal View History

2018-11-06 19:48:50 +00:00
import DB from "../database";
import { ModelDataBase } from "@hibas123/safe_mongo";
2018-11-06 19:48:50 +00:00
export interface IMail extends ModelDataBase {
mail: string;
verified: boolean;
primary: boolean;
}
const Mail = DB.addModel<IMail>({
name: "mail",
2020-08-07 14:16:39 +00:00
versions: [
{
migration: () => {},
schema: {
mail: { type: String },
verified: { type: Boolean, default: false },
primary: { type: Boolean },
},
},
],
});
2018-11-06 19:48:50 +00:00
2020-08-07 14:16:39 +00:00
export default Mail;