blob: eb632e4fea3b8cf9573e52568708831e0f8d3764 [file] [log] [blame]
stgleb75c70412015-02-17 02:52:00 +02001from sqlalchemy import ForeignKey
2from web_app.app import db
3
4
5class Build(db.Model):
6 id = db.Column(db.Integer, primary_key=True)
7 build_id = db.Column(db.String(64))
8 name = db.Column(db.String(64))
9 md5 = db.Column(db.String(64))
10 type = db.Column(db.Integer)
11
12 def __repr__(self):
13 return self.build_id + " " + self.name + " " + self.type
14
15
16class Param(db.Model):
17 id = db.Column(db.Integer, primary_key=True)
18 name = db.Column(db.String(64))
19 type = db.Column(db.String(64))
20 descr = db.Column(db.String(4096))
21
22
23class ParamCombination(db.Model):
24 id = db.Column(db.Integer, primary_key=True)
25 param_1 = db.Column(db.Text())
26 param_2 = db.Column(db.Text())
27 param_3 = db.Column(db.Text())
gstepanove6ad1f02015-03-02 19:58:00 +020028 param_4 = db.Column(db.Text())
29 param_5 = db.Column(db.Text())
30 param_6 = db.Column(db.Text())
31 param_7 = db.Column(db.Text())
32 param_8 = db.Column(db.Text())
33 param_9 = db.Column(db.Text())
34 param_10 = db.Column(db.Text())
35 param_11 = db.Column(db.Text())
36 param_12 = db.Column(db.Text())
37 param_13 = db.Column(db.Text())
38 param_14 = db.Column(db.Text())
39 param_15 = db.Column(db.Text())
40 param_16 = db.Column(db.Text())
41 param_17 = db.Column(db.Text())
42 param_18 = db.Column(db.Text())
43 param_19 = db.Column(db.Text())
44 param_20 = db.Column(db.Text())
stgleb75c70412015-02-17 02:52:00 +020045
46 def __repr__(self):
47 return self.param_1 + " " + self.param_2 + " " + self.param_3
48
49
50class Lab(db.Model):
51 id = db.Column(db.Integer, primary_key=True)
gstepanov15681d62015-02-23 17:17:50 +020052 name = db.Column(db.String(64), unique=True)
53 url = db.Column(db.String(256))
stgleb75c70412015-02-17 02:52:00 +020054 type = db.Column(db.String(4096))
gstepanov15681d62015-02-23 17:17:50 +020055 fuel_version = db.Column(db.String(64))
56 ceph_version = db.Column(db.String(64))
57 lab_general_info = db.Column(db.Text)
58 lab_meta = db.Column(db.Text)
stgleb75c70412015-02-17 02:52:00 +020059
60
61class Result(db.Model):
62 id = db.Column(db.Integer, primary_key=True)
63 build_id = db.Column(db.Integer, ForeignKey('build.id'))
gstepanov15681d62015-02-23 17:17:50 +020064 lab_id = db.Column(db.Integer, ForeignKey('lab.id'))
stgleb75c70412015-02-17 02:52:00 +020065 date = db.Column(db.DateTime)
gstepanove6ad1f02015-03-02 19:58:00 +020066 param_combination_id = db.Column(db.Integer,
67 ForeignKey('param_combination.id'))
stgleb75c70412015-02-17 02:52:00 +020068 bandwith = db.Column(db.Float)
69 meta = db.Column(db.String(4096))
70
71 def __repr__(self):
72 return str(self.bandwith) + " " + str(self.date)