Class: TrackSetOrigin
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TrackSetOrigin
- Extended by:
- TrackSetExtender
- Defined in:
- lib/ting_model/track_set_origin.rb
Direct Known Subclasses
TrackSet, TrackSet0, TrackSet1, TrackSet10, TrackSet11, TrackSet12, TrackSet13, TrackSet14, TrackSet15, TrackSet16, TrackSet17, TrackSet18, TrackSet19, TrackSet2, TrackSet20, TrackSet21, TrackSet22, TrackSet23, TrackSet24, TrackSet25, TrackSet26, TrackSet27, TrackSet28, TrackSet29, TrackSet3, TrackSet30, TrackSet31, TrackSet32, TrackSet33, TrackSet34, TrackSet35, TrackSet36, TrackSet37, TrackSet38, TrackSet39, TrackSet4, TrackSet40, TrackSet41, TrackSet42, TrackSet43, TrackSet44, TrackSet45, TrackSet46, TrackSet47, TrackSet48, TrackSet49, TrackSet5, TrackSet50, TrackSet51, TrackSet52, TrackSet53, TrackSet54, TrackSet55, TrackSet56, TrackSet57, TrackSet58, TrackSet59, TrackSet6, TrackSet60, TrackSet61, TrackSet62, TrackSet63, TrackSet64, TrackSet65, TrackSet66, TrackSet67, TrackSet68, TrackSet69, TrackSet7, TrackSet70, TrackSet71, TrackSet72, TrackSet73, TrackSet74, TrackSet75, TrackSet76, TrackSet77, TrackSet78, TrackSet79, TrackSet8, TrackSet80, TrackSet81, TrackSet82, TrackSet83, TrackSet84, TrackSet85, TrackSet86, TrackSet87, TrackSet88, TrackSet89, TrackSet9, TrackSet90, TrackSet91, TrackSet92, TrackSet93, TrackSet94, TrackSet95, TrackSet96, TrackSet97, TrackSet98, TrackSet99
Class Method Summary collapse
Instance Method Summary collapse
- #is_crawler_disp ⇒ Object
- #is_publish_disp ⇒ Object
- #to_topic_hash ⇒ Object
- #user_source_disp ⇒ Object
Methods included from TrackSetExtender
Class Method Details
.hashlize(obj) ⇒ Object
80 81 82 83 84 85 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 |
# File 'lib/ting_model/track_set_origin.rb', line 80 def self.hashlize(obj) { id: obj.id, uid: obj.uid, nickname: obj.nickname, avatar_path: obj.avatar_path, is_v: obj.is_v, is_public: obj.is_public, is_publish: obj.is_publish, user_source: obj.user_source, category_id: obj.category_id, tags: obj., title: obj.title, intro: obj.intro, cover_path: obj.cover_path, created_at: obj.created_at, updated_at: obj.updated_at, music_category: obj.music_category, tracks_order: obj.tracks_order, is_crawler: obj.is_crawler, rich_intro: obj.rich_intro, op_type: obj.op_type, short_intro: obj.short_intro, is_deleted: obj.is_deleted, source_url: obj.source_url, is_records_desc: obj.is_records_desc, last_uptrack_at: obj.last_uptrack_at, last_uptrack_id: obj.last_uptrack_id, last_uptrack_title: obj.last_uptrack_title, last_uptrack_cover_path: obj.last_uptrack_cover_path, status: obj.status, dig_status: obj.dig_status, human_category_id: obj.human_category_id } end |
Instance Method Details
#is_crawler_disp ⇒ Object
138 139 140 141 142 143 144 145 |
# File 'lib/ting_model/track_set_origin.rb', line 138 def is_crawler_disp case self.is_crawler when true '爬虫' when false '用户' end end |
#is_publish_disp ⇒ Object
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/ting_model/track_set_origin.rb', line 116 def is_publish_disp case self.is_publish when true '审核通过' when false '审核不通过' else '审核通过' end end |
#to_topic_hash ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/ting_model/track_set_origin.rb', line 54 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, music_category: self.music_category, is_deleted: self.is_deleted, status: self.status, dig_status: self.dig_status, extra_tags: self. } end |
#user_source_disp ⇒ Object
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/ting_model/track_set_origin.rb', line 127 def user_source_disp case user_source when 1 '原创' when 2 '采集' else '' end end |