1 /*******************************************************************************
2 * Copyright (c) 2017 Kumar Rishabh(penguinRaider) and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Apache License, Version 2.0
6 * which accompanies this distribution, and is available at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *******************************************************************************/
11 photo_id: {type: 'increments', nullable: false, primary: true},
12 photo_url: {type: 'string', maxlength: 254, nullable: false}
15 user_id: {type: 'increments', nullable: false, primary: true},
16 user_name: {type: 'string', maxlength: 254, nullable: false},
17 password: {type: 'string', maxlength: 150, nullable: false},
18 email_id: {type: 'string', maxlength: 254, nullable: false, unique: true, validations: {isEmail: true}},
19 photo_id: {type: 'integer', nullable: true, unsigned: true, references: 'photo.photo_id'},
20 company: {type: 'string', maxlength: 254, nullable: false},
21 introduction: {type: 'string', maxlength: 510, nullable: false},
22 last_login: {type: 'dateTime', nullable: true},
23 created_at: {type: 'dateTime', nullable: false},
26 vnf_id: {type: 'increments', nullable: false, primary: true},
27 vnf_name: {type: 'string', maxlength: 254, nullable: false},
28 repo_url: {type: 'string', maxlength: 254, nullable: false},
29 photo_id: {type: 'integer', nullable: true, unsigned: true, references: 'photo.photo_id'},
30 submitter_id: {type: 'integer', nullable: false, unsigned: true, references: 'user.user_id'},
31 lines_of_code: {type: 'integer', nullable: true, unsigned: true},
32 versions: {type: 'integer', nullable: true, unsigned: true},
33 no_of_developers: {type: 'integer', nullable: true, unsigned: true},
34 no_of_stars: {type: 'integer', nullable: true, unsigned: true},
35 license: {type: 'enum', nullable: false, values: ['MIT', 'GPL', 'GPL_V2', 'BSD', 'APACHE']},
36 opnfv_indicator: {type: 'enum', nullable: false, values: ['gold', 'silver', 'platinum']},
37 complexity: {type: 'enum', nullable: true, values: ['low', 'medium', 'high']},
38 activity: {type: 'enum', nullable: true, values: ['low', 'medium', 'high']},
39 last_updated: {type: 'dateTime', nullable: true},
42 tag_id: {type: 'increments', nullable: false, primary: true},
43 tag_name: {type: 'string', maxlength: 150, nullable: false}
46 vnf_tag_id: {type: 'increments', nullable: false, primary: true},
47 tag_id: {type: 'integer', nullable: false, unsigned: true, references: 'tag.tag_id'},
48 vnf_id: {type: 'integer', nullable: false, unsigned: true, references: 'vnf.vnf_id'},
51 vnf_contributors_id: {type: 'increments', nullable: false, primary: true},
52 user_id: {type: 'integer', nullable: false, unsigned: true, references: 'user.user_id'},
53 vnf_id: {type: 'integer', nullable: false, unsigned: true, references: 'vnf.vnf_id'},
54 created_at: {type: 'dateTime', nullable: false},
57 module.exports = Schema;