-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77f2f10
commit 370df38
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import mongoose, { Schema } from "mongoose"; | ||
|
||
const aboutSchema = new Schema( | ||
{ | ||
image: { | ||
data: Buffer, | ||
contentType: String | ||
}, | ||
title: String, | ||
desc: String, | ||
name: String, | ||
nickname: String, | ||
age: Number, | ||
birthday: String, | ||
sex: String, | ||
nationality: String, | ||
status: String, | ||
languages: String | ||
}, { | ||
timestamps: true, | ||
} | ||
); | ||
|
||
const About = mongoose.models.About || mongoose.model("About", aboutSchema); | ||
|
||
export default About; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import mongoose, { Schema } from "mongoose"; | ||
|
||
const projectSchema = new Schema( | ||
{ | ||
image: { | ||
data: Buffer, | ||
contentType: String | ||
}, | ||
title: String, | ||
desc: String, | ||
href: String, | ||
}, { | ||
timestamps: true, | ||
} | ||
); | ||
|
||
const Project = mongoose.models.Project || mongoose.model("Project", projectSchema); | ||
|
||
export default Project; |