summaryrefslogtreecommitdiff
blob: 73b04136ea3ba21823eeaf4dabe3f056b337d674 (plain)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# Copyright 1998-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

from django.db import models

class Categories(models.Model):
	CategoryId = models.IntegerField(primary_key=True, db_column='category_id')
	Category = models.CharField(max_length=150, db_column='category')
	Active = models.BooleanField(db_column='active')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'categories'
	def __str__(self):
		return '%s %s %s %s' % (self.CategoryId, self.Category, self.Active, self.TimeStamp)

class CategoriesMetadata(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	CategoryId = models.ForeignKey(Categories, db_column='category_id')
	Checksum = models.CharField(max_length=100, db_column='checksum')
	Descriptions = models.TextField(db_column='descriptions')
	class Meta:
		db_table = 'categories_metadata'
	def __str__(self):
		return '%s %s %s %s' % (self.Id, self.CategoryId, self.Checksum, self.Descriptions)

class Repos(models.Model):
	RepoId = models.IntegerField(primary_key=True, db_column='repo_id')
	Repo = models.CharField(max_length=100, db_column='repo')
	class Meta:
		db_table = 'repos'
	def __str__(self):
		return '%s %s' % (self.RepoId, self.Repo)

class Packages(models.Model):
	PackageId = models.IntegerField(primary_key=True, db_column='package_id')
	CategoryId = models.ForeignKey(Categories, db_column='category_id')
	Package = models.CharField(max_length=150, db_column='package')
	RepoId = models.ForeignKey(Repos, db_column='repo_id')
	Active = models.BooleanField(db_column='active')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'packages'
	def __str__(self):
		return '%s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Active, self.TimeStamp)

class PackagesMetadata(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	PackageId = models.ForeignKey(Packages, db_column='package_id')
	Gitlog = models.TextField(db_column='gitlog')
	Descriptions = models.TextField(db_column='descriptions')
	New = models.BooleanField(db_column='new')
	class Meta:
		db_table = 'packages_metadata'
	def __str__(self):
		return '%s %s %s %s %s' % (self.Id, self.PackageId, self.Gitlog, self.Descriptions, self.New)

class Ebuilds(models.Model):
	EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id')
	PackageId = models.ForeignKey(Packages, db_column='package_id')
	Version = models.CharField(max_length=150, db_column='version')
	Checksum = models.CharField(max_length=100, db_column='checksum')
	Active = models.BooleanField(db_column='active')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'ebuilds'
	def __str__(self):
		return '%s %s %s %s %s %s' % (self.EbuildId, self.PackageId, self.Version, self.Checksum, self.Active, self.TimeStamp)

class EbuildsMetadata(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id')
	Commit = models.CharField(max_length=30, db_column='git_commit')
	CommitMsg = models.CharField(max_length=100, db_column='git_commit_msg')
	New = models.BooleanField(db_column='new')
	Updated = models.BooleanField(db_column='updated')
	Descriptions = models.CharField(max_length=200, db_column='descriptions')
	Slot = models.CharField(max_length=10, db_column='slot')
	Homepage = models.CharField(max_length=200, db_column='homepage')
	License = models.CharField(max_length=200, db_column='license')
	class Meta:
		db_table = 'ebuilds_metadata'
	def __str__(self):
		return '%s %s %s %s %s %s %s %s %s %s' % (self.Id, self.EbuildId, self.Commit, self.CommitMsg, self.New, self.Updated, self.Descriptions, self.Slot, self.Homepage, self.License)

class BuildLogs(models.Model):
	BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id')
	EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id')
	Fail =  models.BooleanField(db_column='fail')
	SummeryText = models.TextField(db_column='summery_text')
	LogHash = models.CharField(max_length=100, db_column='log_hash')
	BugId = models.IntegerField( db_column='bug_id')
	New = models.BooleanField(db_column='new')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'build_logs'
	def __str__(self):
		return '%s %s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.SummeryText, self.LogHash, self.BugId, self.New, self.TimeStamp)

class BuildLogsRepoman(models.Model):
	Id = models.IntegerField(primary_key=True, db_column='id')
	BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
	SummeryText = models.TextField(db_column='summery_text')
	class Meta:
		db_table = 'build_logs_repoman'
	def __str__(self):
		return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText)

class BuildLogsQa(models.Model):
	Id = models.IntegerField(primary_key=True, db_column='id')
	BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
	SummeryText = models.TextField(db_column='summery_text')
	class Meta:
		db_table = 'build_logs_qa'
	def __str__(self):
		return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText)

class PackagesRepoman(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	PackageId = models.ForeignKey(Packages, db_column='package_id')
	RepomanText = models.TextField(db_column='repoman_text')
	RepomanHash = models.CharField(max_length=100, db_column='repoman_hash')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'packages_repoman'
	def __str__(self):
		return '%s %s %s %s %s' % (self.Id, self.PackageId, self.RepomanText, self.RepomanHash, self.TimeStamp)

class ErrorsInfo(models.Model):
	ErrorId = models.IntegerField(primary_key=True, db_column='error_id')
	ErrorName = models.CharField(max_length=20, db_column='error_name')
	ErrorSearch = models.CharField(max_length=30, db_column='error_search')
	class Meta:
		db_table = 'errors_info'
	def __str__(self):
		return '%s %s %s' % (self.ErrorId, self.ErrorName, self.ErrorSearch)

class BuildLogsErrors(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
	ErrorId = models.ForeignKey(ErrorsInfo, db_column='error_id')
	class Meta:
		db_table = 'build_logs_errors'
	def __str__(self):
		return '%s %s %s' % (self.Id, self.BuildLogId, self.ErrorId)

class EmergeInfo(models.Model):
	EInfoId = models.AutoField(primary_key=True, db_column='einfo_id')
	EmergeInfoText = models.TextField(db_column='emerge_info_text')
	class Meta:
		db_table = 'emerge_info'
	def __str__(self):
		return '%s %s %s' % (self.EInfoId, self.Checksum, self.EmergeInfoText)

class Keywords(models.Model):
	KeywordId = models.AutoField(primary_key=True, db_column='keyword_id')
	Keyword = models.CharField(max_length=40, db_column='keyword')
	class Meta:
		db_table = 'keywords'
	def __str__(self):
		return '%s %s' % (self.KeywordId, self.keyword)

class Setups(models.Model):
	SetupId = models.AutoField(primary_key=True, db_column='setup_id')
	Setup = models.CharField(max_length=100, db_column='setup')
	Profile = models.CharField(max_length=150, db_column='profile')
	class Meta:
		db_table = 'setups'
	def __str__(self):
		return '%s %s %s' % (self.SetupId, self.Setup, self.Profile)

class Configs(models.Model):
	ConfigId = models.AutoField(primary_key=True, db_column='config_id')
	HostName = models.CharField(max_length=150, db_column='hostname')
	SetupId = models.ForeignKey(Setups, db_column='setup_id')
	DefaultConfig = models.BooleanField(db_column='default_config')
	class Meta:
		db_table = 'configs'
	def __str__(self):
		return '%s %s %s %s' % (self.ConfigId, self.HostName, self.SetupId, self.DefaultConfig)

class ConfigsMetaData(models.Model):
	Id = models.AutoField(primary_key=True, db_column='id')
	ConfigId = models.ForeignKey(Configs, db_column='config_id')
	KeywordId = models.ForeignKey(Keywords, db_column='keyword_id')
	MakeConfText = models.TextField(db_column='make_conf_text')
	Checksum = models.CharField(max_length=100, db_column='checksum')
	ConfigSync = models.BooleanField(db_column='configsync')
	Active = models.BooleanField(db_column='active')
	ConfigErrorText = models.TextField(db_column='config_error_text')
	Updateing = models.CharField(max_length=100, db_column='updateing')
	Status = models.CharField(max_length=100, db_column='status')
	Auto = models.BooleanField(db_column='auto')
	RepoPath = models.CharField(max_length=200, db_column='repo_path')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'configs_metadata'
	def __str__(self):
		return '%s %s %s %s %s %s %s %s %s %s %s %s' % (self.ConfigId, self.KeywordId, self.MakeConfText, self.Checksum, self.ConfigSync, self.Active, self.ConfigErrorText, self.Updateing, self.Status, self.Auto, self.RepoPath, self.TimeStamp)

class BuildLogsConfig(models.Model):
	LogId = models.IntegerField(primary_key=True, db_column='log_id')
	BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
	ConfigId = models.ForeignKey(Configs, db_column='config_id')
	EInfoId = models.ForeignKey(EmergeInfo, db_column='einfo_id')
	LogName = models.CharField(max_length=450, db_column='logname')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'build_logs_config'
	def __str__(self):
		return '%s %s %s %s %s %s' % (self.LogId, self.BuildLogId, self.ConfigId, self.EInfoId, self.LogName, self.TimeStamp)

class EmergeOptions(models.Model):
	EmergeOptionId = models.IntegerField(primary_key=True, db_column='eoption_id')
	EOption = models.CharField(max_length=45, db_column='eoption')
	class Meta:
		db_table = 'emerge_options'
	def __str__(self):
		return '%s %s' % (self.EmergeOptionId, self.EOption)

class BuildLogsEmergeOptions(models.Model):
	Id = models.IntegerField(primary_key=True, db_column='id')
	BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
	EmergeOptionId = models.ForeignKey(EmergeOptions, db_column='eoption_id')
	class Meta:
		db_table = 'build_logs_emerge_options'
	def __str__(self):
		return '%s %s %s' % (self.Id, self.BuildLogId, self.EmergeOptionId)

class Uses(models.Model):
	UseId = models.IntegerField(primary_key=True, db_column='use_id')
	Flag = models.CharField(max_length=150, db_column='flag')
	class Meta:
		db_table = 'uses'
	def __str__(self):
		return '%s %s' % (self.UseId, self.Flag)

class BuildLogsUse(models.Model):
	Id = models.IntegerField(primary_key=True, db_column='id')
	BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id')
	UseId = models.ForeignKey(Uses, db_column='use_id')
	Status = models.BooleanField(max_length=15, db_column='status')
	class Meta:
		db_table = 'build_logs_use'
	def __str__(self):
		return '%s %s %s' % (self.BuildLogId, self.UseId, self.Status)

class BuildJobs(models.Model):
	BuildJobId = models.AutoField(primary_key=True, db_column='build_job_id')
	EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id')
	SetupId = models.ForeignKey(Setups, db_column='setup_id')
	ConfigId = models.ForeignKey(Configs, db_column='config_id')
	Status = models.CharField(max_length=21, db_column='status')
	BuildNow = models.BooleanField(db_column='build_now')
	RemoveBin = models.BooleanField(db_column='removebin')
	New = models.BooleanField(db_column='new')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'build_jobs'
	def __str__(self):
		return '%s %s %s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.SetupId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.New, self.TimeStamp)

class BuildJobsUse(models.Model):
	Id = models.IntegerField(primary_key=True, db_column='id')
	BuildJobId = models.ForeignKey(BuildJobs, db_column='build_job_id')
	UseId = models.ForeignKey(Uses, db_column='use_id')
	Status = models.BooleanField(db_column='status')
	class Meta:
		db_table = 'build_jobs_use'
	def __str__(self):
		return '%s %s %s %s' % (self.Id, self.BuildJobId, self.UseId, self.Status)

class Restrictions(models.Model):
	RestrictionId = models.IntegerField(primary_key=True, db_column='restriction_id')
	Restriction = models.CharField(max_length=150, db_column='restriction')
	class Meta:
		db_table = 'restrictions'
	def __str__(self):
		return '%s %s' % (self.RestrictionId, self.Restriction)

class EbuildsKeywords(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id')
	KeywordId = models.ForeignKey(Keywords, db_column='keyword_id')
	Status = models.CharField(max_length=24, db_column='status')
	class Meta:
		db_table = 'ebuilds_keywords'
	def __str__(self):
		return '%s %s %s' % (self.EbuildId, self.KeywordId, self.Status)

class EbuildsIuse(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id')
	UseId = models.ForeignKey(Uses, db_column='use_id')
	Status =models.BooleanField(db_column='status')
	class Meta:
		db_table = 'ebuilds_iuse'
	def __str__(self):
		return '%s %s %s %s' % (self.Id, self.EbuildId, self.UseId, self.Status)

class EbuildsRestrictions(models.Model):
	Id =  models.IntegerField(primary_key=True, db_column='id')
	EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id')
	RestrictionId = models.ForeignKey(Restrictions, db_column='restriction_id')
	class Meta:
		db_table = 'ebuilds_restrictions'
	def __str__(self):
		return '%s %s' % (self.EbuildId, self.RestrictionId)

class Emails(models.Model):
	EmailId = models.IntegerField(primary_key=True, db_column='email_id')
	Email = models.CharField(max_length=160, db_column='email')
	class Meta:
		db_table = 'emails'
	def __str__(self):
		return '%s %s' % (self.EmailId, self.Email)

class PackagesEmails(models.Model):
	Id = models.IntegerField(primary_key=True, db_column='id')
	PackageId = models.ForeignKey(Packages, db_column='package_id')
	EmailId = models.ForeignKey(Emails, db_column='email_id')
	class Meta:
		db_table = 'packages_emails'
	def __str__(self):
		return '%s %s' % (self.PackageId, self.EmailId)

class Jobs(models.Model):
	JobId =  models.IntegerField(primary_key=True, db_column='job_id')
	JobType = models.CharField(max_length=60, db_column='job_type')
	Status = models.CharField(max_length=60, db_column='status')
	User = models.CharField(max_length=60, db_column='user')
	ConfigId = models.ForeignKey(Configs, db_column='config_id')
	RunConfigId = models.ForeignKey(Configs, to_field='ConfigId', related_name='RunConfigId', db_column='run_config_id')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table = 'jobs'
	def __str__(self):
		return '%s %s %s %s %s %s %s' % (self.JobId, self.JobType, self.Status, self.User, self.ConfigId, self.RunConfigId, self.TimeStamp)