subapp_model 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/.DS_Store +0 -0
- data/lib/subapp_model/font.rb +5 -0
- data/lib/subapp_model/skin.rb +5 -0
- data/lib/subapp_model/sub_app_advertisement.rb +7 -0
- data/lib/subapp_model/sub_app_log.rb +21 -0
- data/lib/subapp_model/sub_app_recommend.rb +55 -0
- data/lib/subapp_model/subapp_push_app.rb +5 -0
- data/lib/subapp_model/subapp_push_msg.rb +5 -0
- data/lib/subapp_model/version.rb +1 -1
- metadata +9 -3
- data/.gemtags +0 -11312
- data/.gitignore +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c68be8a7f602825cfb83cfbd40800c9522706587
|
4
|
+
data.tar.gz: e6c4a95df07e2d963b4e858c9e40c252b1b0c0e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1573be8b0f820b3bc430dd73aab3c2c6b4f5ce3371fbf6b262451b1a675cfa9abd75aef82a40e1c89a7408253d212d22a7a2f24599c40978b6ff15bdf8267a74
|
7
|
+
data.tar.gz: c9b73d98fab222307e8d9a509b7b131f3b1a52668722d6d3a543869a7cba55817ece01b0a11d6ac8372f9a1be5a93db0f02afb8f310b6a0afa3c7f3306869ac8
|
data/lib/.DS_Store
ADDED
Binary file
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class SubAppAdvertisement < ActiveRecord::Base
|
2
|
+
establish_connection SUBAPP_DB
|
3
|
+
self.table_name = "tb_sub_app_advertisement" #子APP广告显示
|
4
|
+
attr_accessible :channel, :column_type, :link_url, :position, :sub_app_recommend_id, :terminal, :time_at
|
5
|
+
|
6
|
+
belongs_to :sub_app_recommend
|
7
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class SubAppLog < ActiveRecord::Base
|
2
|
+
establish_connection SUBAPP_DB
|
3
|
+
self.table_name = "tb_sub_app_log" #子APP日志
|
4
|
+
attr_accessible :app_download_url, :app_id, :operator, :version, :certificate_name, :status, :backtrace, :device_type, :version_code
|
5
|
+
|
6
|
+
# status 1: 正在打包 2:打包成功 3:打包失败
|
7
|
+
# backtrace 打包日志
|
8
|
+
# device_type 1: iphone 2: ipad 3: android
|
9
|
+
|
10
|
+
def status_disp
|
11
|
+
case self.status
|
12
|
+
when 1
|
13
|
+
"打包中"
|
14
|
+
when 2
|
15
|
+
"打包成功"
|
16
|
+
when 3
|
17
|
+
"打包失败"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
class SubAppRecommend < ActiveRecord::Base
|
3
|
+
establish_connection SUBAPP_DB
|
4
|
+
self.table_name = "tb_sub_app_recommend" #子APP广告配置
|
5
|
+
attr_accessible :app_name, :channel, :column_type, :cover_path, :intro, :link_url, :name, :terminal, :is_deleted
|
6
|
+
|
7
|
+
has_many :sub_app_advertisements, dependent: :destroy
|
8
|
+
validates_uniqueness_of :name, message: "广告名称已经存在!"
|
9
|
+
|
10
|
+
def terminal_disp
|
11
|
+
case self.terminal
|
12
|
+
when 1
|
13
|
+
"ios"
|
14
|
+
when 2
|
15
|
+
"android"
|
16
|
+
else
|
17
|
+
""
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def channel_disp
|
22
|
+
case self.channel
|
23
|
+
when 1
|
24
|
+
"应用推荐"
|
25
|
+
when 2
|
26
|
+
"Feed广告"
|
27
|
+
else
|
28
|
+
""
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def is_deleted_disp
|
33
|
+
case self.is_deleted
|
34
|
+
when true
|
35
|
+
"是"
|
36
|
+
when false
|
37
|
+
"否"
|
38
|
+
else
|
39
|
+
""
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def column_type_disp
|
44
|
+
case self.column_type
|
45
|
+
when 1
|
46
|
+
"今日推荐"
|
47
|
+
when 2
|
48
|
+
"热门推荐"
|
49
|
+
when 3
|
50
|
+
"装机必备"
|
51
|
+
else
|
52
|
+
""
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/subapp_model/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subapp_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gavin
|
@@ -45,13 +45,12 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gemtags
|
49
|
-
- .gitignore
|
50
48
|
- Gemfile
|
51
49
|
- LICENSE.txt
|
52
50
|
- README.md
|
53
51
|
- Rakefile
|
54
52
|
- ctags.rb
|
53
|
+
- lib/.DS_Store
|
55
54
|
- lib/subapp_model.rb
|
56
55
|
- lib/subapp_model/app.rb
|
57
56
|
- lib/subapp_model/app_ad.rb
|
@@ -62,6 +61,13 @@ files:
|
|
62
61
|
- lib/subapp_model/app_category.rb
|
63
62
|
- lib/subapp_model/app_material.rb
|
64
63
|
- lib/subapp_model/app_tag.rb
|
64
|
+
- lib/subapp_model/font.rb
|
65
|
+
- lib/subapp_model/skin.rb
|
66
|
+
- lib/subapp_model/sub_app_advertisement.rb
|
67
|
+
- lib/subapp_model/sub_app_log.rb
|
68
|
+
- lib/subapp_model/sub_app_recommend.rb
|
69
|
+
- lib/subapp_model/subapp_push_app.rb
|
70
|
+
- lib/subapp_model/subapp_push_msg.rb
|
65
71
|
- lib/subapp_model/version.rb
|
66
72
|
- subapp_model.gemspec
|
67
73
|
homepage: ''
|