1
0
Fork 0
gnuviechadmin-historic/testdb/gnuviechadmin/entities.py

76 lines
2.1 KiB
Python

# -*- coding: utf-8 -*-
#
# Copyright (C) 2007, 2008 by Jan Dittberner.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
# Version: $Id$
class Client(object):
def __repr__(self):
return "%s(clientid=%s,firstname=%s,lastname=%s)" % \
(self.__class__.__name__,
self.clientid,
self.firstname,
self.lastname)
class PopAccount(object):
def __repr__(self):
return "%s(%s,%d,%d,%d,%s,%s,%s)" % \
(self.__class__.__name__,
self.id,
self.domainid,
self.uid,
self.gid,
self.home,
self.cryptpass,
self.clearpass)
class SysUser(object):
def __repr__(self):
return "%s(%d,%s,%d,%s,%s,%s,%d,%d,%s,%d)" % \
(self.__class__.__name__,
self.sysuserid,
self.name,
self.type,
self.home,
self.shell,
self.password,
self.clientid,
self.toupdate,
self.md5pass,
self.sysuid)
class Domain(object):
def __repr__(self):
return "%s(%d,%s,%s,%s,%s,%s,%s)" % \
(self.__class__.__name__,
self.id,
self.name,
self.master,
self.last_check,
self.type,
self.notified_serial,
self.account)