source: main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/students/interfaces.py @ 11476

Last change on this file since 11476 was 10809, checked in by Henrik Bettermann, 11 years ago

Add address fields.

  • Property svn:keywords set to Id
File size: 3.2 KB
RevLine 
[10770]1## $Id: interfaces.py 10809 2013-11-29 06:45:29Z henrik $
2##
3## Copyright (C) 2012 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18
19from zope import schema
20from kofacustom.nigeria.students.interfaces import (
21    INigeriaStudentBase, INigeriaUGStudentClearance, INigeriaPGStudentClearance,
22    INigeriaStudentPersonal, INigeriaStudentStudyLevel,
23    INigeriaStudentStudyCourse, INigeriaCourseTicket,
24    INigeriaStudentUpdateByRegNo, INigeriaStudentUpdateByMatricNo,
25    )
26from kofacustom.ekodisco.payments.interfaces import ICustomOnlinePayment
27from kofacustom.ekodisco.interfaces import MessageFactory as _
28
29class ICustomStudentBase(INigeriaStudentBase):
30    """Representation of student base data.
31
32    """
33
[10809]34    perm_address = schema.Text(
35        title = _(u'Customer Address'),
36        required = False,
37        )
38
[10770]39class ICustomStudentPersonal(INigeriaStudentPersonal):
40    """Student personal data.
41
42    """
43
44class ICustomUGStudentClearance(INigeriaUGStudentClearance):
45    """Representation of ug student clearance data.
46
47    """
48
49class ICustomPGStudentClearance(INigeriaPGStudentClearance):
50    """Representation of pg student clearance data.
51
52    """
53
54
55class ICustomStudent(ICustomStudentBase,ICustomUGStudentClearance,
56    ICustomPGStudentClearance,ICustomStudentPersonal):
57    """Representation of a student.
58
59    """
60
61class ICustomStudentStudyCourse(INigeriaStudentStudyCourse):
62    """A container for student study levels.
63
64    """
65
[10809]66    service_address = schema.Text(
67        title = _(u'Service Address'),
68        required = False,
69        )
70
[10770]71class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
72    """A container for course tickets.
73
74    """
75
76class ICustomStudentOnlinePayment(ICustomOnlinePayment):
77    """A student payment via payment gateways.
78
79    This Interface does not inherit from IStudentOnlinePayment.
80    Thus all fields from IStudentOnlinePayment have to be repeated here.
81    """
82
83    p_current = schema.Bool(
84        title = _(u'Current Session Payment'),
85        default = True,
86        required = False,
87        )
88
89    p_level = schema.Int(
90        title = _(u'Payment Level'),
91        required = False,
92        )
93
94ICustomStudentOnlinePayment['p_level'].order = ICustomStudentOnlinePayment[
95    'p_session'].order
96
97class ICustomCourseTicket(INigeriaCourseTicket):
98    """A course ticket.
99
100    """
101
102class ICustomStudentUpdateByRegNo(INigeriaStudentUpdateByRegNo):
103    """Representation of a student. Skip regular reg_number validation.
104
105    """
106
107class ICustomStudentUpdateByMatricNo(INigeriaStudentUpdateByMatricNo):
108    """Representation of a student. Skip regular matric_number validation.
109
110    """
Note: See TracBrowser for help on using the repository browser.