class TrackOrigin
Public Instance Methods
dig_status_disp()
click to toggle source
去发现页状态显示
# File lib/ting_model/track_origin.rb, line 190 def dig_status_disp case self.dig_status when 0 '待去' when 1 '去' when 2 '不去' end end
is_crawler_disp()
click to toggle source
# File lib/ting_model/track_origin.rb, line 147 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/track_origin.rb, line 156 def is_publish_disp case self.is_publish when true '审核通过' when false '审核不通过' else '审核通过' end end
is_v_disp()
click to toggle source
是否加V
# File lib/ting_model/track_origin.rb, line 202 def is_v_disp case self.is_v when true "是" when false "否" end end
to_topic_hash()
click to toggle source
# File lib/ting_model/track_origin.rb, line 86 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, duration: self.duration, download_path: self.download_path, play_path: self.play_path, play_path_32: self.play_path_32, play_path_64: self.play_path_64, play_path_128: self.play_path_128, singer: self.singer, singer_category: self.singer_category, author: self.author, composer: self.composer, arrangement: self.arrangement, post_production: self.post_production, lyric: self.lyric, lyric_path: self.lyric_path, language: self.language, resinger: self.resinger, announcer: self.announcer, access_password: self.access_password, allow_download: self.allow_download, allow_comment: self.allow_comment, is_crawler: self.is_crawler, inet_aton_ip: self.inet_aton_ip, upload_source: self.upload_source, longitude: self.longitude, latitude: self.latitude, album_id: self.album_id, album_title: self.album_title, album_cover_path: self.album_cover_path, transcode_state: self.transcode_state, music_category: self.music_category, short_intro: self.short_intro, dig_status: self.dig_status, approved_at: self.approved_at, is_deleted: self.is_deleted, mp3size: self.mp3size, mp3size_32: self.mp3size_32, mp3size_64: self.mp3size_64, waveform: self.waveform, upload_id: self.upload_id, status: self.status } end
track_status_disp()
click to toggle source
审核状态
# File lib/ting_model/track_origin.rb, line 212 def track_status_disp case status when 0 "待审核" when 1 "通过" when 2 "不通过" end end
upload_source_disp()
click to toggle source
# File lib/ting_model/track_origin.rb, line 178 def upload_source_disp case self.upload_source when 1 'ios' when 2 '电脑' when 3 'android' end end
user_source_disp()
click to toggle source
# File lib/ting_model/track_origin.rb, line 167 def user_source_disp case user_source when 1 '原创' when 2 '采集' else '' end end