class AlbumOrigin

Public Instance Methods

is_crawler_disp() click to toggle source
# File lib/ting_model/album_origin.rb, line 128
def is_crawler_disp
  case self.is_crawler
    when true
      '爬虫'
    when false
      '用户'
  end
end
is_publish_disp() click to toggle source
# File lib/ting_model/album_origin.rb, line 106
def is_publish_disp
  case self.is_publish
    when true
      '审核通过'
    when false
      '审核不通过'
    else
      '审核通过'
  end
end
to_topic_hash() click to toggle source
# File lib/ting_model/album_origin.rb, line 80
def to_topic_hash
  {
    created_at: self.created_at,
    updated_at: self.updated_at,
    id: self.id,
    uid: self.uid,
    nickname: self.nickname,
    avatar_path: self.avatar_path,
    is_v: self.is_v,
    human_category_id: self.human_category_id,
    is_public: self.is_public,
    is_publish: self.is_publish,
    user_source: self.user_source,
    category_id: self.category_id,
    tags: self.tags,
    title: self.title,
    intro: self.intro,
    cover_path: self.cover_path,
    music_category: self.music_category,
    is_deleted: self.is_deleted,
    status: self.status,
    dig_status: self.dig_status,
    extra_tags: self.extra_tags
  }
end
user_source_disp() click to toggle source
# File lib/ting_model/album_origin.rb, line 117
def user_source_disp
  case user_source
    when 1
      '原创'
    when 2
      '采集'
    else
      ''
  end
end