class User

Public Class Methods

getTableName(key) click to toggle source
# File lib/caishu_model2/user.rb, line 9
      def self.getTableName(key)
      las = Zlib::crc32(key.to_s).to_i.to_s
      return "users#{las[0]}"
end
next_id() click to toggle source
# File lib/caishu_model2/user.rb, line 25
def self.next_id
      key = 'user_next_id'
      REDIS.incr(key)
      REDIS.get(key)
end
setTableName(key) click to toggle source
# File lib/caishu_model2/user.rb, line 4
    def self.setTableName(key)
            self.table_name = self.getTableName(key)
self
    end