Sha256: aefe2d75d16a8ec5200e54cbd7d5b2051bfbcc887efbafb75c70dde3380bcc75

Contents?: true

Size: 696 Bytes

Versions: 3

Compression:

Stored size: 696 Bytes

Contents

import com.google.appengine.ext.duby.db.Model
import com.google.appengine.api.datastore.*
import dubious.TimeConversion
import java.util.Date

class Contact < Model
  property :title,    String
  property :birthday, Date
  property :url,      Link
  property :platform, String
  property :editor,   String
  property :summary,  Text
  property :address,  PostalAddress
  property :phone,    PhoneNumber
  property :private,  Boolean

  # timestamps
  property :created_at, Date
  property :updated_at, Date
  def before_save
    @updated_at = Date.new
    @created_at = updated_at if @created_at.nil?
  end

  def coerce_date(o:Object)
    TimeConversion.new('jsdate').parse(String(o))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dubious-0.0.2-java examples/contacts/app/models/contact.mirah
dubious-0.0.1-java examples/contacts/app/models/contact.mirah
dubious-0.0.0-java examples/contacts/app/models/contact.mirah