ish_models 0.0.33.37 → 0.0.33.38
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gallery.rb +4 -3
- data/lib/ish/lead.rb +25 -0
- data/lib/ish_models/user_profile.rb +9 -4
- data/lib/ish_models.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a36a759d3c5df00858b7b4a4b156effa6a115b98
|
4
|
+
data.tar.gz: 7743095516d016ee85723704a9359b420eb896f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1de9f46e70857aec5db00efc7c8459aecdd111ab954ffcc332d2725df73dcd6fe0c049cec7f3373181eafb84fd1e793a613f5b9276a95442d7cdf37119da563a
|
7
|
+
data.tar.gz: 9d7a4574898eb513da47ae7d71c75afcd09c58b548a8a4d79949e5890b7c4bb92f0796f0edf82d0b77be812220e2696c296805dd282d7699b5c333f1c2575f8a
|
data/lib/gallery.rb
CHANGED
@@ -19,9 +19,9 @@ class Gallery
|
|
19
19
|
belongs_to :site
|
20
20
|
validates :site, :presence => true
|
21
21
|
|
22
|
-
belongs_to :
|
23
|
-
|
24
|
-
|
22
|
+
belongs_to :user_profile, :optional => true, :class_name => 'IshModels::UserProfile', :inverse_of => :galleries
|
23
|
+
field :username, :type => String # denormalization, not used _vp_ 20171203
|
24
|
+
has_and_belongs_to_many :shared_profiles, :class_name => 'IshModels::UserProfile', :inverse_of => :shared_galleries
|
25
25
|
|
26
26
|
field :name, :type => String
|
27
27
|
validates :name, :uniqueness => true # , :allow_nil => false
|
@@ -42,6 +42,7 @@ class Gallery
|
|
42
42
|
|
43
43
|
has_many :newsitems
|
44
44
|
|
45
|
+
|
45
46
|
set_callback(:create, :before) do |doc|
|
46
47
|
if doc.user_profile && doc.user_profile.username
|
47
48
|
doc.username = doc.user_profile.username
|
data/lib/ish/lead.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Lead
|
4
|
+
# _vp_ 20171204
|
5
|
+
#
|
6
|
+
class Ish::Lead
|
7
|
+
include Mongoid::Document
|
8
|
+
include Mongoid::Timestamps
|
9
|
+
|
10
|
+
store_in :collection => 'ish_lead'
|
11
|
+
|
12
|
+
belongs_to :profile, :class_name => 'IshModels::UserProfile'
|
13
|
+
|
14
|
+
field :email
|
15
|
+
field :job_url
|
16
|
+
field :company, :default => ''
|
17
|
+
field :description
|
18
|
+
|
19
|
+
=begin
|
20
|
+
field :amount, :type => Float
|
21
|
+
has_many :payments, :class_name => 'Ish::Payment'
|
22
|
+
field :description, :type => String
|
23
|
+
=end
|
24
|
+
|
25
|
+
end
|
@@ -27,13 +27,18 @@ class IshModels::UserProfile
|
|
27
27
|
belongs_to :current_city, :class_name => 'City', :inverse_of => :current_users, :optional => true
|
28
28
|
belongs_to :guide_city, :class_name => 'City', :inverse_of => :guide, :optional => true
|
29
29
|
|
30
|
-
has_many :galleries
|
31
|
-
|
32
|
-
has_many :videos
|
33
|
-
has_many :photos
|
30
|
+
has_many :galleries, :inverse_of => :user_profile
|
31
|
+
has_and_belongs_to_many :shared_galleries, :class_name => 'Gallery', :inverse_of => :shared_profiles
|
34
32
|
|
33
|
+
has_many :invoices
|
34
|
+
has_many :leads
|
35
|
+
has_many :photos
|
36
|
+
has_many :reports, :inverse_of => :profile
|
35
37
|
has_many :stocks, :class_name => 'Ish::StockWatch'
|
38
|
+
has_many :videos
|
36
39
|
|
40
|
+
has_and_belongs_to_many :friends, :class_name => 'IshModels::UserProfile', :inverse_of => :friendeds
|
41
|
+
has_and_belongs_to_many :friendeds, :class_name => 'IshModels::UserProfile', :inverse_of => :friends
|
37
42
|
#
|
38
43
|
# preferences
|
39
44
|
#
|
data/lib/ish_models.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.33.
|
4
|
+
version: 0.0.33.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- lib/gallery2.rb
|
78
78
|
- lib/ish/gallery_name.rb
|
79
79
|
- lib/ish/invoice.rb
|
80
|
+
- lib/ish/lead.rb
|
80
81
|
- lib/ish/payment.rb
|
81
82
|
- lib/ish/stock_action.rb
|
82
83
|
- lib/ish/stock_option.rb
|