subj_models 0.1.05 → 0.1.06

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82d89cdbd2b65439c84b982cb18691fbce5695c5
4
- data.tar.gz: c472c01f696b0ca810e2a050bb98dfd17337a510
3
+ metadata.gz: addf4023524948fd0c922445e4f2f7caecb04780
4
+ data.tar.gz: ca350711474bd7a958b59f0605d8d5bb7ed32c2a
5
5
  SHA512:
6
- metadata.gz: f07d137c04074a9eea278c5c204f4833f66e53fc2f490de16c47d96199affa66faaf02f6afdf53ac65f9caf7edaf49b5ed75bb3b26c500b4da176dbf03a19a19
7
- data.tar.gz: f2edcda45a78ba37c40fd6b94265086c1af2ca0fd60352571ffb78b37927453aa298dfd06fabadf307b9ed82055c56a2863082c5795519b4c6ce52f4f0957baa
6
+ metadata.gz: 2a20448d1462f0f4273b540c9c3ba9d9d16412d4ac860e838f57e6e6e7381d0b4f2414d2627d3a79b63ea90ad6b4b01fab687f09118f1395916a289e5be6db00
7
+ data.tar.gz: aeda71b71818ee4440c72fd9850b4ae6e79d7101697f4b04391876d3dd8a69e7021155394717dee11c448224d90c53189520323d22828c80b92ec0e40c848671
@@ -0,0 +1,111 @@
1
+ module SubjModels
2
+ module TypesSupport
3
+
4
+ BASE64_FORMAT = /\A(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?\z/
5
+
6
+ module UserTypes
7
+ ADMIN = 1
8
+ LEGAL_PERSON = 2
9
+ NATURAL_PERSON = 3
10
+
11
+ USER_TYPES = { 'админ' => ADMIN, 'юридическое лицо' => LEGAL_PERSON, 'физическое лицо' => NATURAL_PERSON }
12
+ end
13
+
14
+ module EventTypes
15
+ WEBINAR = 1
16
+ OFFLINE = 2
17
+
18
+ EVENT_TYPES = { 'вебинар' => WEBINAR, 'оффлайн' => OFFLINE }
19
+ end
20
+
21
+ module FileTypes
22
+ PICTURE = 1
23
+ PDF = 2
24
+ VIDEO = 3
25
+
26
+ FILE_TYPES = { 'изображение' => PICTURE, 'PDF' => PDF, 'видео' => VIDEO }
27
+ end
28
+
29
+ module CardReceiveTypes
30
+ PICKUP = 1
31
+ WITH_ORDER = 2
32
+ POST_DELIVERY = 3
33
+
34
+ CARD_RECEIVE_TYPES = { 'Самовывоз' => PICKUP, 'С первым заказом' => WITH_ORDER, 'Со склада новой почты' => POST_DELIVERY }
35
+ end
36
+
37
+ module ContactTypes
38
+ ADDRESS = 1
39
+ PHONE = 2
40
+ EMAIL = 3
41
+ SKYPE = 4
42
+
43
+ CONTACT_TYPES = {
44
+ 'адрес' => ADDRESS,
45
+ 'телефон' => PHONE,
46
+ 'email' => EMAIL,
47
+ 'skype' => SKYPE
48
+ }
49
+ end
50
+
51
+ module OrderStatuses
52
+ RECEIVED = 1
53
+ PROCESSED = 2
54
+ EN_ROUTE_EXTERNAL_COURIER = 3
55
+ EN_ROUTE_INTERNAL_COURIER = 4
56
+
57
+ ORDER_STATUSES = {
58
+ 'принят' => RECEIVED,
59
+ 'в обработке' => PROCESSED,
60
+ 'в пути(внешний курьер)' => EN_ROUTE_EXTERNAL_COURIER,
61
+ 'внутренний курьер' => EN_ROUTE_INTERNAL_COURIER
62
+ }
63
+ end
64
+
65
+ module DeliveryTypes
66
+ PRIVAT_BANK_PICK_POINT = 1
67
+ PICKUP = 2
68
+ NOVAYA_POCHTA_BY_COURIER = 3
69
+ NOVAYA_POCHTA_FROM_STORAGE = 4
70
+ SUBJ_COURIER = 5
71
+
72
+ DELIVERY_TYPES = {
73
+ 'приват банк(почтомат)' => PRIVAT_BANK_PICK_POINT,
74
+ 'самовывоз из центра' => PICKUP,
75
+ 'курьер новой почты' => NOVAYA_POCHTA_BY_COURIER,
76
+ 'склад новой почты' => NOVAYA_POCHTA_FROM_STORAGE,
77
+ 'курьер SUBJ' => SUBJ_COURIER
78
+ }
79
+ end
80
+
81
+ module PaymentTypes
82
+ CARD = 1
83
+ CASH_ON_COURIER_DELIVERY = 2
84
+ BANK_TRANSFER = 3
85
+ CASH_IN_SUBJ_CENTER = 4
86
+
87
+ PAYMENT_TYPES = {
88
+ 'картой' => CARD,
89
+ 'курьеру' => CASH_ON_COURIER_DELIVERY,
90
+ 'банковским переводом' => BANK_TRANSFER,
91
+ 'наличными в центре Subj' => CASH_IN_SUBJ_CENTER
92
+ }
93
+ end
94
+
95
+ module ItemTypes
96
+ PRODUCT = 1
97
+ EVENT = 2
98
+
99
+ ITEM_TYPES = { 'товар' => PRODUCT, 'мероприятие' => EVENT }
100
+ end
101
+
102
+ module FaqTypes
103
+ FAQ = 1
104
+ FAQ_DELIVERY = 2
105
+ FAQ_PAYMENT = 3
106
+
107
+ FAQ_TYPES = { 'помощь' => FAQ, 'доставка' => FAQ_DELIVERY, 'оплата' => FAQ_PAYMENT }
108
+ end
109
+ end
110
+ end
111
+
@@ -1,3 +1,5 @@
1
+ require 'services/types_support'
2
+
1
3
  module SubjModels
2
4
 
3
5
  module User
@@ -7,8 +9,8 @@ module SubjModels
7
9
  including_class.class_eval do
8
10
 
9
11
  include ComprisingExternalId
10
- include TypesSupport::UserTypes
11
- include TypesSupport::CardReceiveTypes
12
+ include SubjModels::TypesSupport::UserTypes
13
+ include SubjModels::TypesSupport::CardReceiveTypes
12
14
  include RademadeAdmin::UserModule
13
15
  include SharedScopes
14
16
  include ValuesChecker
@@ -1,3 +1,3 @@
1
1
  module SubjModels
2
- VERSION = "0.1.05"
2
+ VERSION = "0.1.06"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subj_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.05
4
+ version: 0.1.06
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denys Dvoriashyn
@@ -58,6 +58,7 @@ files:
58
58
  - bin/setup
59
59
  - lib/subj_models.rb
60
60
  - lib/subj_models/measure_unit.rb
61
+ - lib/subj_models/services/types_support.rb
61
62
  - lib/subj_models/user.rb
62
63
  - lib/subj_models/version.rb
63
64
  - subj_models.gemspec