Restrucure consumer + monorepo

This commit is contained in:
Emily
2024-11-15 23:36:40 +01:00
parent 5ac43dec6b
commit 41037a01a1
25 changed files with 11658 additions and 1479 deletions

View File

@@ -0,0 +1,16 @@
import { model, Schema, Types } from 'mongoose';
export type TAppsumoCode = {
_id: Schema.Types.ObjectId,
code: string,
used_at: Date,
created_at?: Date,
}
const AppsumoCodeSchema = new Schema<TAppsumoCode>({
code: { type: String, index: 1 },
created_at: { type: Date, default: () => Date.now() },
used_at: { type: Date, required: false },
});
export const AppsumoCodeModel = model<TAppsumoCode>('appsumo_codes', AppsumoCodeSchema);