Sha256: 448ab909fe47f481eb9ca5707ffd26b716d99ba202e02508dc22d6f72434aadd

Contents?: true

Size: 1.43 KB

Versions: 2

Compression:

Stored size: 1.43 KB

Contents

class CityCost < Sequel::Model(:'city cost')
  set_primary_key [:'kid - user', :'kid - mult', :'kid - comm', :'kid - date', :'kid - time']

  unrestrict_primary_key

  def after_initialize
    set_kids if new?
  end

  def set_kids
    self.kid_date = rand(65535)
    self.kid_time = rand(65535)
    self.kid_comm = rand(255)
    self.kid_mult = rand(255)
    self.kid_user = rand(36**4).to_s(36)
    self.owner_kid_date = citypair.kid_date
    self.owner_kid_time = citypair.kid_time
    self.owner_kid_mult = citypair.kid_mult
    self.owner_kid_comm = citypair.kid_comm
    self.owner_kid_user = citypair.kid_user
  end

  n_to_o :city_pair, :class=>:CityPair, :prefix=>'owner'

#### BEGIN GENERATED SECTION ####

  column_alias :dh_fare, :'dh fare'
  column_alias :effective_date, :'effective date'
  column_alias :end_date, :'end date'
  column_alias :fare, :'fare'
  column_alias :internal0, :'internal0'
  column_alias :kid_comm, :'kid - comm'
  column_alias :kid_date, :'kid - date'
  column_alias :kid_mult, :'kid - mult'
  column_alias :kid_time, :'kid - time'
  column_alias :kid_user, :'kid - user'
  column_alias :owner_kid_comm, :'owner kid - comm'
  column_alias :owner_kid_date, :'owner kid - date'
  column_alias :owner_kid_mult, :'owner kid - mult'
  column_alias :owner_kid_time, :'owner kid - time'
  column_alias :owner_kid_user, :'owner kid - user'
  column_alias :key0, :'key0'
  column_alias :key1, :'key1'
#### END GENERATED SECTION ####

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fossil-0.5.36 lib/models/city_cost.rb
fossil-0.5.35 lib/models/city_cost.rb