-
Notifications
You must be signed in to change notification settings - Fork 0
/
Job.js
44 lines (43 loc) · 1.28 KB
/
Job.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
var mongoose = require('mongoose');
var JobSchema = new mongoose.Schema({
username: {
type: String,
index: true,
required: true,
},
category: String,
sub_category: String,
title: {
type: String,
required: true,
},
days_to_complete: { //the estimation days this gig/jobs should be completed to show to dealer
type: Number,
default: 1,
},
job_type: String, //defines if employee || employer
description: String,
images: [String], //as support if the job needs it.
nft_symbol: String,
paying_price: Number,
escrow_type: {
type: String,
default: 'system',
}, //may be 'system'(auto-feature), select_from_lists, none
escrow_username: {
type: String,
default: 'none',
},
promoted: Boolean, //this may be a special feature if pay some fee to appear first in searches
active: Boolean, //true: active, false: paused.
verifyed_profiles_only: Boolean,
createdAt: Date,
updatedAt: Date,
blocked: {
type: Boolean,
default: false,
}, //just can be filled by system or admins
note: String,//the note with details about this blocked status
});
mongoose.model('Job',JobSchema);
module.exports = mongoose.model('Job');