ish_models 0.0.33.257 → 0.0.33.258
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish/user_profile.rb +3 -2
- data/lib/ish_models.rb +6 -0
- data/lib/wco/organization.rb +12 -0
- data/lib/wco/product.rb +11 -0
- data/lib/wco/subscription.rb +9 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e1f1bed433ccb852de3a46410a673a4e4552b4f48221f4c286ca15f5b805689
|
4
|
+
data.tar.gz: 180e91b85001dbdca3d42a7af78a5dabf7fb6b5aa5e92b153e75e5ac7b1d1e2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad31349efdde87b88e17797f250a3fc99e7c25fad9d1a38d061a8519f4773e0b30aa065371f9645f025d7390ce3bfecbda8742857139ad96077bcebb1580c8d4
|
7
|
+
data.tar.gz: cc3390211ef7febde3b27b4f3bddd9dd4916e1bcd128cb6d5587b89c435bd6435002cafe05bd78ec4c09e812c040587d17db793d1384056273d27c83f09a8eff
|
data/lib/ish/user_profile.rb
CHANGED
@@ -55,6 +55,9 @@ class Ish::UserProfile
|
|
55
55
|
has_many :reports, inverse_of: :user_profile
|
56
56
|
has_many :videos, inverse_of: :user_profile
|
57
57
|
has_many :newsitems, inverse_of: :profile
|
58
|
+
has_and_belongs_to_many :friends, :class_name => '::Ish::UserProfile', inverse_of: :friendeds
|
59
|
+
has_and_belongs_to_many :friendeds, :class_name => '::Ish::UserProfile', inverse_of: :friends
|
60
|
+
belongs_to :organization, class_name: '::Wco::Organization', inverse_of: :profile
|
58
61
|
|
59
62
|
def sudoer?
|
60
63
|
%w( piousbox@gmail.com victor@wasya.co ).include?( self.email )
|
@@ -79,8 +82,6 @@ class Ish::UserProfile
|
|
79
82
|
|
80
83
|
field :is_purchasing, type: Boolean, default: false
|
81
84
|
|
82
|
-
has_and_belongs_to_many :friends, :class_name => '::Ish::UserProfile', inverse_of: :friendeds
|
83
|
-
has_and_belongs_to_many :friendeds, :class_name => '::Ish::UserProfile', inverse_of: :friends
|
84
85
|
|
85
86
|
# used in rake tasks
|
86
87
|
def self.generate delta
|
data/lib/ish_models.rb
CHANGED
@@ -13,6 +13,8 @@ module Manager; end
|
|
13
13
|
|
14
14
|
module Office; end
|
15
15
|
|
16
|
+
module Wco; end
|
17
|
+
|
16
18
|
module IshModels
|
17
19
|
|
18
20
|
class << self
|
@@ -72,6 +74,10 @@ require 'office/email_message'
|
|
72
74
|
require 'office/email_message_stub'
|
73
75
|
require 'office/scheduled_email_action'
|
74
76
|
|
77
|
+
require 'wco/organization'
|
78
|
+
require 'wco/product'
|
79
|
+
require 'wco/subscription'
|
80
|
+
|
75
81
|
|
76
82
|
|
77
83
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
class Wco::Organization
|
3
|
+
include Mongoid::Document
|
4
|
+
include Mongoid::Timestamps
|
5
|
+
|
6
|
+
field :name
|
7
|
+
field :customer_id # stripe
|
8
|
+
|
9
|
+
has_many :profiles, class_name: '::Ish::UserProfile', inverse_of: :organization
|
10
|
+
has_many :subscriptions, class_name: '::Wco::Subscription', inverse_of: :organization
|
11
|
+
|
12
|
+
end
|
data/lib/wco/product.rb
ADDED
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.258
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -171,6 +171,9 @@ files:
|
|
171
171
|
- lib/photo.rb
|
172
172
|
- lib/report.rb
|
173
173
|
- lib/video.rb
|
174
|
+
- lib/wco/organization.rb
|
175
|
+
- lib/wco/product.rb
|
176
|
+
- lib/wco/subscription.rb
|
174
177
|
homepage: https://wasya.co
|
175
178
|
licenses:
|
176
179
|
- Proprietary
|