Skip to content
Snippets Groups Projects
Commit ee5fddc7 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Card Schema

parent d31335c7
No related branches found
No related tags found
3 merge requests!24Auth, Profile, News, Entry Card, File management,!21update feature/news_api branch,!19Profile and Entry Card
import { Document, Schema, model } from "mongoose";
import ProfileSchema from "./ProfileSchema";
export interface ICard extends Document {
user: typeof ProfileSchema;
backgroundImage?: string;
createDate: Date;
expirationDate: Date;
isTaken: boolean;
}
const CardSchema = new Schema({
// _id: card Number
user: { type: ProfileSchema, required: true },
backgroundImage: { type: String },
createDate: { type: Date, required: true },
expirationDate: { type: Date, required: true },
isTaken: { type: Boolean, required: true, default: false },
});
export default model<ICard>("Card", CardSchema);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment