| author | Tomas Zeman <tzeman@volny.cz> |
| Thu, 12 Apr 2012 13:37:04 +0200 | |
| changeset 52 | f40c67ede33d |
| parent 37 | ee98077f6d1a |
| permissions | -rw-r--r-- |
| 8 | 1 |
/* |
|
23
16066379860c
Global entity removal from base schema
Tomas Zeman <tzeman@volny.cz>
parents:
15
diff
changeset
|
2 |
* Copyright 2011-2012 Tomas Zeman <tzeman@volny.cz> |
| 8 | 3 |
* |
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package fis.crm.model |
|
17 |
||
|
23
16066379860c
Global entity removal from base schema
Tomas Zeman <tzeman@volny.cz>
parents:
15
diff
changeset
|
18 |
import fis.base.model.{Entity, MetaEntity}
|
| 15 | 19 |
import net.liftweb.common._ |
| 8 | 20 |
import net.liftweb.record.{MetaRecord, Record}
|
21 |
import net.liftweb.record.field._ |
|
| 35 | 22 |
import net.liftweb.squerylrecord.RecordTypeMode._ |
| 52 | 23 |
import net.tz.lift.model.{FieldLabel => FL, FieldHelp => FH}
|
| 35 | 24 |
import net.tz.lift.model.{OptionalFieldDisplay => OptDisp}
|
|
37
ee98077f6d1a
Contact should use tz's OptionalEmailField
Tomas Zeman <tzeman@volny.cz>
parents:
35
diff
changeset
|
25 |
import net.tz.lift.model.{OptionalEmailField => OptEmail}
|
| 15 | 26 |
import scala.xml.Text |
27 |
||
| 8 | 28 |
class Contact private() extends Record[Contact] with Entity[Contact] {
|
29 |
||
30 |
def meta = Contact |
|
31 |
||
| 35 | 32 |
val firstName = new StringField(this, 80, "") with FL |
33 |
val lastName = new StringField(this, 80, "") with FL |
|
34 |
val position = new OptionalStringField(this, 40) with OptDisp with FL |
|
| 52 | 35 |
val workMail = new EmailField(this, 256) with FL with FH |
|
37
ee98077f6d1a
Contact should use tz's OptionalEmailField
Tomas Zeman <tzeman@volny.cz>
parents:
35
diff
changeset
|
36 |
val privateMail = new OptEmail(this, 256) with OptDisp with FL |
|
ee98077f6d1a
Contact should use tz's OptionalEmailField
Tomas Zeman <tzeman@volny.cz>
parents:
35
diff
changeset
|
37 |
val otherMail = new OptEmail(this, 256) with OptDisp with FL |
| 35 | 38 |
val workMobile = new StringField(this, 40) with FL |
39 |
val privateMobile = new OptionalStringField(this, 40) with OptDisp with FL |
|
40 |
val otherMobile = new OptionalStringField(this, 40) with OptDisp with FL |
|
41 |
val workPhone = new OptionalStringField(this, 40) with OptDisp with FL |
|
42 |
val privatePhone = new OptionalStringField(this, 40) with OptDisp with FL |
|
43 |
val fax = new OptionalStringField(this, 40) with OptDisp with FL |
|
| 8 | 44 |
|
45 |
override def linkName = lastName.get + " " + firstName.get |
|
46 |
} |
|
47 |
||
| 35 | 48 |
object Contact extends Contact with MetaRecord[Contact] |
| 8 | 49 |
|
50 |
// vim: set ts=2 sw=2 et: |