Repository navigation
Expand file tree
/
Copy pathschemaops.js
More file actions
102 lines (79 loc) · 1.55 KB
/
Copy pathschemaops.js
File metadata and controls
102 lines (79 loc) · 1.55 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
var mongoose = require('mongoose');
var SchemaPkg = require('./SchemaInit').SchemaInit;
schema = new SchemaInit();
SchemaOps = function(schematype){
if (schematype === '1' )
{
this.add = UserAdd;
this.del = UserdDel;
this.update= UserUp;
this.show = UserShow;
}
else if( schematype === '2' )
{
this.add = PageAdd;
this.del = PagedDel;
this.update= PageUp;
this.show = PageShow;
}
else if( schematype === '3' )
{
this.add = CommentAdd;
this.del = CommentdDel;
this.update= CommentUp;
this.show = CommentShow;
}
};
//// User
UserAdd = function(ID,Type,Name,Email,MoNo)
{
console.log(" useradd ");
};
UserDel = function( ID )
{
console.log(" userdel ");
};
UserUp = function( UpID, ID,Type,Name,Email,MoNo )
{
console.log(" userupdate ");
};
UserShow = function( ID )
{
console.log(" usershow ");
};
////Page
PageAdd = function(ID, Title, Type, EventType)
{
console.log(" pageadd ");
};
PageDel = function( ID )
{
console.log(" pagedel ");
};
PageUp = function(UpID, ID, Title, Type, EventType)
{
console.log(" pageup ");
};
PageShow = function( ID )
{
console.log(" pageshow ");
};
//////comment
CommentAdd = function(ID, UID, PID, Comment, Tagged, Reply,Like, Dislike, Type, time)
{
console.log(" commentadd ");
};
CommentDel = function( ID )
{
console.log(" commentdel ");
};
CommentUp = function(UpID ,ID, UID, PID, Comment, Tagged, Reply,Like, Dislike, Type, time )
{
console.log(" commentup ");
};
CommentDel = function( ID )
{
console.log(" commentshow ");
};
///export schema object
exports.SchemaOps = SchemaOps;