-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels.py
More file actions
33 lines (27 loc) · 979 Bytes
/
models.py
File metadata and controls
33 lines (27 loc) · 979 Bytes
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
from flask import Flask
from flask_mongoalchemy import MongoAlchemy
app = Flask(__name__)
app.config['MONGOALCHEMY_DATABASE'] = 'axizoun'
app.config['MONGOALCHEMY_CONNECTION_STRING'] = 'mongodb://axizoun:axizoun123@ds255715.mlab.com:55715/axizoun'
db = MongoAlchemy(app)
class Employee(db.Document):
email = db.StringField()
password = db.StringField()
first_name = db.StringField()
last_name = db.StringField()
class Employer(db.Document):
email = db.StringField()
password = db.StringField()
company_name = db.StringField()
first_name = db.StringField()
last_name = db.StringField()
class Jobs(db.Document):
company_name = db.StringField()
vacancy = db.StringField()
languages = db.ListField(db.StringField())
position = db.StringField()
start_date = db.DateTimeField()
date_posted = db.DateTimeField()
stipend = db.IntField()
applicants = db.ListField(db.StringField())
status = db.StringField()