src/main/scala/fis/geo/model/Country.scala
author Tomas Zeman <tzeman@volny.cz>
Fri, 20 Apr 2012 08:26:22 +0200
changeset 61 b65843860274
parent 9 fe20033afdf1
child 65 a35a0edf9ddd
permissions -rw-r--r--
Trackable entity: created/updated fields

/*
 * Copyright 2011 Tomas Zeman <tzeman@volny.cz>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package fis.geo.model

import fis.base.model.{Entity, MetaEntity}
import net.liftweb.record.{MetaRecord, Record}
import net.liftweb.record.field._

class Country private() extends Record[Country] with Entity[Country] {
  def meta = Country

  val iso2 = new StringField(this, 2)
  val iso3 = new StringField(this, 3)
  lazy val cities = GeoSchema.countryToCities.left(this)
}

object Country extends Country with MetaRecord[Country] with
  MetaEntity[Country] {
  def getTable = GeoSchema.countries
}

// vim: set ts=2 sw=2 et: