24 lines
540 B
TypeScript
24 lines
540 B
TypeScript
|
import DB from "../database";
|
||
|
import { ModelDataBase } from "@hibas123/safe_mongo/lib/model";
|
||
|
import { ObjectID } from "mongodb";
|
||
|
import { v4 } from "uuid";
|
||
|
|
||
|
export interface IMail extends ModelDataBase {
|
||
|
mail: string;
|
||
|
verified: boolean;
|
||
|
primary: boolean;
|
||
|
}
|
||
|
|
||
|
const Mail = DB.addModel<IMail>({
|
||
|
name: "mail",
|
||
|
versions: [{
|
||
|
migration: () => { },
|
||
|
schema: {
|
||
|
mail: { type: String },
|
||
|
verified: { type: Boolean, default: false },
|
||
|
primary: { type: Boolean }
|
||
|
}
|
||
|
}]
|
||
|
})
|
||
|
|
||
|
export default Mail;
|