53 lines
900 B
JavaScript
53 lines
900 B
JavaScript
|
import mongoose from "mongoose";
|
||
|
|
||
|
const CollectionSchema = mongoose.Schema(
|
||
|
{
|
||
|
full_name: {
|
||
|
type: String,
|
||
|
// required: true,
|
||
|
},
|
||
|
date_of_birth: {
|
||
|
type: String,
|
||
|
// required: true,
|
||
|
},
|
||
|
userRef: {
|
||
|
type: mongoose.Schema.Types.ObjectId,
|
||
|
ref: "User",
|
||
|
},
|
||
|
id_num: {
|
||
|
type: String,
|
||
|
// required: true,
|
||
|
},
|
||
|
address: {
|
||
|
type: String,
|
||
|
// required: true,
|
||
|
},
|
||
|
images: [
|
||
|
{
|
||
|
link: {
|
||
|
type: String,
|
||
|
},
|
||
|
//required: true,
|
||
|
},
|
||
|
],
|
||
|
selfie: {
|
||
|
type: String,
|
||
|
//required: true,
|
||
|
},
|
||
|
reason: {
|
||
|
type: String,
|
||
|
//required: true,
|
||
|
},
|
||
|
status: {
|
||
|
type: String,
|
||
|
default: "new",
|
||
|
// required: true,
|
||
|
},
|
||
|
},
|
||
|
{ timestamps: true }
|
||
|
);
|
||
|
|
||
|
const Collection = mongoose.model("Collection", CollectionSchema);
|
||
|
|
||
|
export default Collection;
|