This repository has been archived by the owner on Oct 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
models.py
97 lines (73 loc) · 2.54 KB
/
models.py
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
from FORTISApp import db
class Trainees(db.Model):
__tablename__ = 'trainees'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String())
password = db.Column(db.String())
def __init__(self, username, password):
self.username = username
self.password = password
def __repr__(self):
return '<id {}>'.format(self.id)
class Trainers(db.Model):
__tablename__ = 'trainers'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String())
password = db.Column(db.String())
def __init__(self, username, password):
self.username = username
self.password = password
def __repr__(self):
return '<id {}>'.format(self.id)
class Workshops(db.Model):
__tablename__ = 'workshops'
id = db.Column(db.Integer, primary_key=True)
workshop = db.Column(db.String())
def __init__(self, workshop):
self.workshop = workshop
def __repr__(self):
return '<id {}>'.format(self.id)
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer, primary_key=True)
filename = db.Column(db.String())
title = db.Column(db.String())
description = db.Column(db.String())
workshop = db.Column(db.String())
type = db.Column(db.String())
who = db.Column(db.String())
author = db.Column(db.String())
def __init__(self, filename, title, description, workshop, type, who, author):
self.filename = filename
self.title = title
self.description = description
self.workshop = workshop
self.type = type
self.who = who
self.author = author
def __repr__(self):
return '<id {}>'.format(self.id)
class Timetables(db.Model):
__tablename__ = 'timetables'
id = db.Column(db.Integer, primary_key=True)
filename = db.Column(db.String())
workshop = db.Column(db.String())
author = db.Column(db.String())
def __init__(self, filename, workshop, author):
self.filename = filename
self.workshop = workshop
self.author = author
def __repr__(self):
return '<id {}>'.format(self.id)
class Folders(db.Model):
__tablename__ = 'folders'
id = db.Column(db.Integer, primary_key=True)
workshop = db.Column(db.String())
parent = db.Column(db.String())
name = db.Column(db.String())
def __init__(self, workshop, parent, name):
self.workshop = workshop
self.parent = parent
self.name = name
def __repr__(self):
return '<id {}>'.format(self.id)