Пример #1
0
 def __init__(self):
     idcol = AutoId('contactid', 'contact_ident')
     name = PkName('name')
     address = Num('addressid')
     address.set_fk('addresses', 'addressid')
     email = PkBigname('email')
     desc = Text('description')
     Table.__init__(self, 'contacts', [idcol, name, address, email, desc])
Пример #2
0
 def __init__(self, suite, traits_table):
     tablename = ujoin(suite, 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     script_columns = [script_column, sfile_column]
     _TraitRelation.__init__(self, traits_table, tablename, script_columns)
Пример #3
0
 def __init__(self, suite, traits_table):
     tablename = ujoin(suite, 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     script_columns = [script_column, sfile_column]
     _TraitRelation.__init__(self, traits_table, tablename, script_columns)
Пример #4
0
 def __init__(self, mach_types_table):
     mtype_col = PkName('machine_type')
     mtype_col.set_fk(mach_types_table)
     tablename = ujoin('machine_type', 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     script_columns = [mtype_col, script_column, sfile_column]
     Table.__init__(self, tablename, script_columns)
Пример #5
0
 def __init__(self, machines_table):
     machine_col = PkName('machine')
     machine_col.set_fk(machines_table)
     tablename = ujoin('machine', 'scripts')
     script_column = PkName('script')
     script_column.set_fk('scriptnames')
     sfile_column = Num('scriptfile')
     sfile_column.set_fk('textfiles')
     columns = [machine_col, script_column, sfile_column]
     Table.__init__(self, tablename, columns)
Пример #6
0
 def __init__(self):
     ticket = Num('ticketid')
     ticket.set_fk('tickets')
     actionid = AutoId('actionid', 'action_ident', pk=True)
     subject = Bigname('subject')
     action = Name('action')
     author = Name('author')
     posted = Now('posted')
     data = Text('data')
     cols = [ticket, actionid, subject, action, author, posted, data]
     Table.__init__(self, 'ticketactions', cols)
Пример #7
0
 def __init__(self):
     troubleid = AutoId('troubleid', 'trouble_ident', pk=True)
     clientid = Num('clientid')
     clientid.set_fk('clients')
     problem = Name('problem')
     worktodo= Text('worktodo')
     posted = Now('posted')
     status = Name('status')
     status.set_fk('trouble_status')
     cols = [troubleid, clientid, problem, worktodo, posted, status]
     Table.__init__(self, 'troubles', cols)
Пример #8
0
 def __init__(self):
     clientid = Num('clientid')
     clientid.set_fk('clients')
     locationid = Num('locationid')
     locationid.set_fk('locations', 'locationid')
     contactid = Num('contactid')
     contactid.set_fk('contacts', 'contactid')
     cols = [clientid, locationid, contactid]
     Table.__init__(self, 'clientinfo', cols)
Пример #9
0
 def __init__(self):
     magnet = PkName('magnet')
     magnet.set_fk('magnets')
     troubleid = Num('troubleid')
     troubleid.set_fk('troubles')
     Table.__init__(self, 'trouble_magnets', [magnet, troubleid])