-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.js
60 lines (52 loc) · 1.09 KB
/
project.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//const mongoose= require('mongoose');
import mongoose from 'mongoose';
const Schema= mongoose.Schema
const DataSchema= new Schema({
projectName:{
type: String,
required: true,
},
logoUrl:{
type: String,
required: true,
},
fromDate:{
type: String,
required: true,
},
toDate:{
type: String,
required: true,
},
ownerDid:{
type: String,
required: true,
},
projectDid:{
type: Number,
required: true,
},
projectStatus:{
type: Boolean,
required: true,
},
blockchainType:{
type: String,
required: true,
},
themeColor:{
type: String,
required: true,
},
fontColor:{
type: String,
required: true,
},
slug:{
type: String,
required: true,
}
},{ timestamps:true});
// creating product model with Project as database name
const Project= mongoose.model('Project', DataSchema); //Creating a constant to store model in it
export default Project;