|
@@ -1,6 +1,7 @@
|
1
|
1
|
#-*- coding: utf-8 -*-
|
2
|
2
|
|
3
|
3
|
from EditorialModel.components import EmComponent, EmComponentNotExistError
|
|
4
|
+from EditorialModel.fieldtypes import *
|
4
|
5
|
from Database import sqlutils
|
5
|
6
|
from Database.sqlwrapper import SqlWrapper
|
6
|
7
|
from Database.sqlquerybuilder import SqlQueryBuilder
|
|
@@ -18,6 +19,15 @@ logger = logging.getLogger('Lodel2.EditorialModel')
|
18
|
19
|
class EmField(EmComponent):
|
19
|
20
|
|
20
|
21
|
table = 'em_field'
|
|
22
|
+ _fields = [
|
|
23
|
+ ('fieldtype', EmField_char()),
|
|
24
|
+ ('fieldgroup_id', EmField_integer()),
|
|
25
|
+ ('rel_to_type_id', EmField_integer()),
|
|
26
|
+ ('rel_field_id', EmField_integer()),
|
|
27
|
+ ('optional', EmField_boolean()),
|
|
28
|
+ ('internal', EmField_boolean()),
|
|
29
|
+ ('icon', EmField_integer())
|
|
30
|
+ ]
|
21
|
31
|
|
22
|
32
|
## __init__ (Function)
|
23
|
33
|
#
|
|
@@ -28,6 +38,7 @@ class EmField(EmComponent):
|
28
|
38
|
# @see EmComponent::__init__()
|
29
|
39
|
def __init__(self, id_or_name):
|
30
|
40
|
self.table = EmField.table
|
|
41
|
+ self._fields = self.__class__._fields
|
31
|
42
|
super(EmField, self).__init__(id_or_name)
|
32
|
43
|
|
33
|
44
|
## Create (Function)
|