Class: TrackOrigin
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TrackOrigin
- Extended by:
- TrackExtender
- Defined in:
- lib/ting_model/track_origin.rb
Direct Known Subclasses
Track, Track0, Track1, Track10, Track11, Track12, Track13, Track14, Track15, Track16, Track17, Track18, Track19, Track2, Track20, Track21, Track22, Track23, Track24, Track25, Track26, Track27, Track28, Track29, Track3, Track30, Track31, Track32, Track33, Track34, Track35, Track36, Track37, Track38, Track39, Track4, Track40, Track41, Track42, Track43, Track44, Track45, Track46, Track47, Track48, Track49, Track5, Track50, Track51, Track52, Track53, Track54, Track55, Track56, Track57, Track58, Track59, Track6, Track60, Track61, Track62, Track63, Track64, Track65, Track66, Track67, Track68, Track69, Track7, Track70, Track71, Track72, Track73, Track74, Track75, Track76, Track77, Track78, Track79, Track8, Track80, Track81, Track82, Track83, Track84, Track85, Track86, Track87, Track88, Track89, Track9, Track90, Track91, Track92, Track93, Track94, Track95, Track96, Track97, Track98, Track99
Instance Method Summary collapse
-
#dig_status_disp ⇒ Object
去发现页状态显示.
- #is_crawler_disp ⇒ Object
- #is_publish_disp ⇒ Object
-
#is_v_disp ⇒ Object
是否加V.
- #to_topic_hash ⇒ Object
-
#track_status_disp ⇒ Object
审核状态.
- #upload_source_disp ⇒ Object
- #user_source_disp ⇒ Object
Methods included from TrackExtender
Instance Method Details
#dig_status_disp ⇒ Object
去发现页状态显示
190 191 192 193 194 195 196 197 198 199 |
# 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 ⇒ Object
147 148 149 150 151 152 153 154 |
# 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 ⇒ Object
156 157 158 159 160 161 162 163 164 165 |
# 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 ⇒ Object
是否加V
202 203 204 205 206 207 208 209 |
# 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 ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# 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., 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., 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 ⇒ Object
审核状态
212 213 214 215 216 217 218 219 220 221 |
# 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 ⇒ Object
178 179 180 181 182 183 184 185 186 187 |
# 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 ⇒ Object
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/ting_model/track_origin.rb', line 167 def user_source_disp case user_source when 1 '原创' when 2 '采集' else '' end end |