next_sges 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +36 -0
- data/app/assets/config/next_sges_manifest.js +2 -0
- data/app/assets/javascripts/next_sges/administrators.js +2 -0
- data/app/assets/javascripts/next_sges/application.js +13 -0
- data/app/assets/javascripts/next_sges/collection_note_items.js +2 -0
- data/app/assets/javascripts/next_sges/collection_notes.js +2 -0
- data/app/assets/javascripts/next_sges/collection_types.js +2 -0
- data/app/assets/javascripts/next_sges/deposits.js +2 -0
- data/app/assets/javascripts/next_sges/inscriptions.js +2 -0
- data/app/assets/javascripts/next_sges/parents.js +2 -0
- data/app/assets/javascripts/next_sges/responsible_others.js +2 -0
- data/app/assets/javascripts/next_sges/school_admins.js +2 -0
- data/app/assets/javascripts/next_sges/schools.js +2 -0
- data/app/assets/javascripts/next_sges/students.js +2 -0
- data/app/assets/stylesheets/next_sges/administrators.css +4 -0
- data/app/assets/stylesheets/next_sges/application.css +15 -0
- data/app/assets/stylesheets/next_sges/collection_note_items.css +4 -0
- data/app/assets/stylesheets/next_sges/collection_notes.css +4 -0
- data/app/assets/stylesheets/next_sges/collection_types.css +4 -0
- data/app/assets/stylesheets/next_sges/deposits.css +4 -0
- data/app/assets/stylesheets/next_sges/inscriptions.css +4 -0
- data/app/assets/stylesheets/next_sges/parents.css +4 -0
- data/app/assets/stylesheets/next_sges/responsible_others.css +4 -0
- data/app/assets/stylesheets/next_sges/school_admins.css +4 -0
- data/app/assets/stylesheets/next_sges/schools.css +4 -0
- data/app/assets/stylesheets/next_sges/students.css +4 -0
- data/app/assets/stylesheets/scaffold.css +80 -0
- data/app/controllers/next_sges/administrators_controller.rb +62 -0
- data/app/controllers/next_sges/application_controller.rb +5 -0
- data/app/controllers/next_sges/collection_note_items_controller.rb +62 -0
- data/app/controllers/next_sges/collection_notes_controller.rb +62 -0
- data/app/controllers/next_sges/collection_types_controller.rb +62 -0
- data/app/controllers/next_sges/deposits_controller.rb +62 -0
- data/app/controllers/next_sges/inscriptions_controller.rb +62 -0
- data/app/controllers/next_sges/parents_controller.rb +62 -0
- data/app/controllers/next_sges/responsible_others_controller.rb +62 -0
- data/app/controllers/next_sges/school_admins_controller.rb +62 -0
- data/app/controllers/next_sges/schools_controller.rb +62 -0
- data/app/controllers/next_sges/students_controller.rb +62 -0
- data/app/helpers/next_sges/administrators_helper.rb +4 -0
- data/app/helpers/next_sges/application_helper.rb +4 -0
- data/app/helpers/next_sges/collection_note_items_helper.rb +4 -0
- data/app/helpers/next_sges/collection_notes_helper.rb +4 -0
- data/app/helpers/next_sges/collection_types_helper.rb +4 -0
- data/app/helpers/next_sges/deposits_helper.rb +4 -0
- data/app/helpers/next_sges/inscriptions_helper.rb +4 -0
- data/app/helpers/next_sges/parents_helper.rb +4 -0
- data/app/helpers/next_sges/responsible_others_helper.rb +4 -0
- data/app/helpers/next_sges/school_admins_helper.rb +4 -0
- data/app/helpers/next_sges/schools_helper.rb +4 -0
- data/app/helpers/next_sges/students_helper.rb +4 -0
- data/app/jobs/next_sges/application_job.rb +4 -0
- data/app/mailers/next_sges/application_mailer.rb +6 -0
- data/app/models/next_sges/administrator.rb +19 -0
- data/app/models/next_sges/application_record.rb +33 -0
- data/app/models/next_sges/collection_note.rb +68 -0
- data/app/models/next_sges/collection_note_item.rb +173 -0
- data/app/models/next_sges/collection_type.rb +36 -0
- data/app/models/next_sges/deposit.rb +31 -0
- data/app/models/next_sges/inscription.rb +5 -0
- data/app/models/next_sges/parent.rb +37 -0
- data/app/models/next_sges/responsible_other.rb +20 -0
- data/app/models/next_sges/school.rb +21 -0
- data/app/models/next_sges/school_admin.rb +10 -0
- data/app/models/next_sges/student.rb +39 -0
- data/app/views/layouts/next_sges/application.html.erb +14 -0
- data/app/views/next_sges/administrators/_form.html.erb +27 -0
- data/app/views/next_sges/administrators/edit.html.erb +6 -0
- data/app/views/next_sges/administrators/index.html.erb +29 -0
- data/app/views/next_sges/administrators/new.html.erb +5 -0
- data/app/views/next_sges/administrators/show.html.erb +14 -0
- data/app/views/next_sges/collection_note_items/_form.html.erb +107 -0
- data/app/views/next_sges/collection_note_items/edit.html.erb +6 -0
- data/app/views/next_sges/collection_note_items/index.html.erb +61 -0
- data/app/views/next_sges/collection_note_items/new.html.erb +5 -0
- data/app/views/next_sges/collection_note_items/show.html.erb +94 -0
- data/app/views/next_sges/collection_notes/_form.html.erb +37 -0
- data/app/views/next_sges/collection_notes/edit.html.erb +6 -0
- data/app/views/next_sges/collection_notes/index.html.erb +33 -0
- data/app/views/next_sges/collection_notes/new.html.erb +5 -0
- data/app/views/next_sges/collection_notes/show.html.erb +24 -0
- data/app/views/next_sges/collection_types/_form.html.erb +37 -0
- data/app/views/next_sges/collection_types/edit.html.erb +6 -0
- data/app/views/next_sges/collection_types/index.html.erb +33 -0
- data/app/views/next_sges/collection_types/new.html.erb +5 -0
- data/app/views/next_sges/collection_types/show.html.erb +24 -0
- data/app/views/next_sges/deposits/_form.html.erb +37 -0
- data/app/views/next_sges/deposits/edit.html.erb +6 -0
- data/app/views/next_sges/deposits/index.html.erb +33 -0
- data/app/views/next_sges/deposits/new.html.erb +5 -0
- data/app/views/next_sges/deposits/show.html.erb +24 -0
- data/app/views/next_sges/inscriptions/_form.html.erb +102 -0
- data/app/views/next_sges/inscriptions/edit.html.erb +6 -0
- data/app/views/next_sges/inscriptions/index.html.erb +59 -0
- data/app/views/next_sges/inscriptions/new.html.erb +5 -0
- data/app/views/next_sges/inscriptions/show.html.erb +89 -0
- data/app/views/next_sges/parents/_form.html.erb +42 -0
- data/app/views/next_sges/parents/edit.html.erb +6 -0
- data/app/views/next_sges/parents/index.html.erb +35 -0
- data/app/views/next_sges/parents/new.html.erb +5 -0
- data/app/views/next_sges/parents/show.html.erb +29 -0
- data/app/views/next_sges/responsible_others/_form.html.erb +97 -0
- data/app/views/next_sges/responsible_others/edit.html.erb +6 -0
- data/app/views/next_sges/responsible_others/index.html.erb +57 -0
- data/app/views/next_sges/responsible_others/new.html.erb +5 -0
- data/app/views/next_sges/responsible_others/show.html.erb +84 -0
- data/app/views/next_sges/school_admins/_form.html.erb +32 -0
- data/app/views/next_sges/school_admins/edit.html.erb +6 -0
- data/app/views/next_sges/school_admins/index.html.erb +31 -0
- data/app/views/next_sges/school_admins/new.html.erb +5 -0
- data/app/views/next_sges/school_admins/show.html.erb +19 -0
- data/app/views/next_sges/schools/_form.html.erb +62 -0
- data/app/views/next_sges/schools/edit.html.erb +6 -0
- data/app/views/next_sges/schools/index.html.erb +43 -0
- data/app/views/next_sges/schools/new.html.erb +5 -0
- data/app/views/next_sges/schools/show.html.erb +49 -0
- data/app/views/next_sges/students/_form.html.erb +42 -0
- data/app/views/next_sges/students/edit.html.erb +6 -0
- data/app/views/next_sges/students/index.html.erb +35 -0
- data/app/views/next_sges/students/new.html.erb +5 -0
- data/app/views/next_sges/students/show.html.erb +29 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20171209090042_create_next_sges_schools.rb +17 -0
- data/db/migrate/20171209093554_create_next_sges_parents.rb +17 -0
- data/db/migrate/20171209093716_create_next_sges_collection_types.rb +13 -0
- data/db/migrate/20171209095546_create_next_sges_students.rb +17 -0
- data/db/migrate/20171209100114_create_next_sges_collection_notes.rb +14 -0
- data/db/migrate/20171209104046_create_next_sges_deposits.rb +13 -0
- data/db/migrate/20171209110844_create_next_sges_administrators.rb +10 -0
- data/db/migrate/20171209111036_create_next_sges_school_admins.rb +12 -0
- data/db/migrate/20171209213002_create_next_sges_inscriptions.rb +25 -0
- data/db/migrate/20171209213302_create_join_table_inscription_collection_type.rb +8 -0
- data/db/migrate/20171211132659_create_join_table_student_collection_type.rb +8 -0
- data/db/migrate/20171211140033_add_value_to_collection_types.rb +5 -0
- data/db/migrate/20171213141321_create_next_sges_collection_note_items.rb +26 -0
- data/db/migrate/20171213160012_add_discount_ad_fine_to_collection_type.rb +13 -0
- data/db/migrate/20171214154917_rename_anual_payment_discount_from_next_sges_collection_types.rb +5 -0
- data/db/migrate/20171214204406_add_account_balance_to_next_sges_parents.rb +17 -0
- data/db/migrate/20171215120306_remove_student_from_deposit.rb +6 -0
- data/db/migrate/20171215133634_add_type_to_next_sges_deposits.rb +5 -0
- data/db/migrate/20171215144509_add_documents_to_next_sgad_parents.rb +6 -0
- data/db/migrate/20171215175025_add_avatar_to_next_sges_schools.rb +5 -0
- data/db/migrate/20171218082424_add_nif_to_next_sges_schools.rb +11 -0
- data/db/migrate/20171221224739_create_next_sges_responsible_others.rb +24 -0
- data/db/migrate/20171227221731_add_birthday_to_next_sgad_students.rb +7 -0
- data/db/migrate/20180216140129_add_collection_note_to_deposits.rb +5 -0
- data/lib/next_sges.rb +5 -0
- data/lib/next_sges/engine.rb +5 -0
- data/lib/next_sges/version.rb +3 -0
- data/lib/tasks/next_sges_tasks.rake +4 -0
- metadata +224 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<h1>Students</h1>
|
|
4
|
+
|
|
5
|
+
<table>
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th>Name</th>
|
|
9
|
+
<th>Number</th>
|
|
10
|
+
<th>Status</th>
|
|
11
|
+
<th>Parent</th>
|
|
12
|
+
<th>Account balance</th>
|
|
13
|
+
<th colspan="3"></th>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
|
|
17
|
+
<tbody>
|
|
18
|
+
<% @students.each do |student| %>
|
|
19
|
+
<tr>
|
|
20
|
+
<td><%= student.name %></td>
|
|
21
|
+
<td><%= student.number %></td>
|
|
22
|
+
<td><%= student.status %></td>
|
|
23
|
+
<td><%= student.parent %></td>
|
|
24
|
+
<td><%= student.account_balance %></td>
|
|
25
|
+
<td><%= link_to 'Show', student %></td>
|
|
26
|
+
<td><%= link_to 'Edit', edit_student_path(student) %></td>
|
|
27
|
+
<td><%= link_to 'Destroy', student, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
28
|
+
</tr>
|
|
29
|
+
<% end %>
|
|
30
|
+
</tbody>
|
|
31
|
+
</table>
|
|
32
|
+
|
|
33
|
+
<br>
|
|
34
|
+
|
|
35
|
+
<%= link_to 'New Student', new_student_path %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Name:</strong>
|
|
5
|
+
<%= @student.name %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Number:</strong>
|
|
10
|
+
<%= @student.number %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Status:</strong>
|
|
15
|
+
<%= @student.status %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Parent:</strong>
|
|
20
|
+
<%= @student.parent %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
<strong>Account balance:</strong>
|
|
25
|
+
<%= @student.account_balance %>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<%= link_to 'Edit', edit_student_path(@student) %> |
|
|
29
|
+
<%= link_to 'Back', students_path %>
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
NextSges::Engine.routes.draw do
|
|
2
|
+
resources :responsible_others
|
|
3
|
+
resources :collection_note_items
|
|
4
|
+
resources :inscriptions
|
|
5
|
+
resources :school_admins
|
|
6
|
+
resources :administrators
|
|
7
|
+
resources :schools
|
|
8
|
+
resources :deposits
|
|
9
|
+
resources :collection_notes
|
|
10
|
+
resources :collection_types
|
|
11
|
+
resources :students
|
|
12
|
+
resources :parents
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateNextSgesSchools < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_schools do |t|
|
|
4
|
+
t.string :name
|
|
5
|
+
t.string :number
|
|
6
|
+
t.decimal :latitude
|
|
7
|
+
t.decimal :longitude
|
|
8
|
+
t.string :address
|
|
9
|
+
t.string :email
|
|
10
|
+
t.string :email2
|
|
11
|
+
t.string :phone
|
|
12
|
+
t.string :phone
|
|
13
|
+
|
|
14
|
+
t.timestamps
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateNextSgesParents < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_parents do |t|
|
|
4
|
+
t.string :first_name
|
|
5
|
+
t.string :middle_name
|
|
6
|
+
t.string :last_name
|
|
7
|
+
t.string :email
|
|
8
|
+
t.string :cellphone1
|
|
9
|
+
t.string :cellphone2
|
|
10
|
+
t.string :number
|
|
11
|
+
t.integer :status, null: false, default: 0
|
|
12
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
13
|
+
|
|
14
|
+
t.timestamps
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class CreateNextSgesCollectionTypes < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_collection_types do |t|
|
|
4
|
+
t.string :name
|
|
5
|
+
t.text :description
|
|
6
|
+
t.integer :frequency, null: false, default: 0
|
|
7
|
+
t.integer :category, null: false, default: 0
|
|
8
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
9
|
+
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class CreateNextSgesStudents < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_students do |t|
|
|
4
|
+
t.string :first_name
|
|
5
|
+
t.string :middle_name
|
|
6
|
+
t.string :last_name
|
|
7
|
+
t.string :number
|
|
8
|
+
t.integer :status, null: false, default: 0
|
|
9
|
+
t.decimal :account_balance, null: false, default: 0
|
|
10
|
+
t.references :parent, foreign_key: {to_table: :next_sges_parents}, index: true
|
|
11
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
12
|
+
|
|
13
|
+
t.timestamps
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
class CreateNextSgesCollectionNotes < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_collection_notes do |t|
|
|
4
|
+
t.string :number
|
|
5
|
+
t.decimal :value, null: false, default: 0
|
|
6
|
+
t.integer :status, null: false, default: 0
|
|
7
|
+
t.references :student, foreign_key: {to_table: :next_sges_students}, index: true
|
|
8
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
9
|
+
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class CreateNextSgesDeposits < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_deposits do |t|
|
|
4
|
+
t.string :number
|
|
5
|
+
t.decimal :value, default: 0, null: false
|
|
6
|
+
t.integer :status, default: 0, null: false
|
|
7
|
+
t.references :student, foreign_key: {to_table: :next_sges_students}, index: true
|
|
8
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
9
|
+
|
|
10
|
+
t.timestamps
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
class CreateNextSgesSchoolAdmins < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_school_admins do |t|
|
|
4
|
+
t.string :number
|
|
5
|
+
t.references :user, polymorphic: true
|
|
6
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
7
|
+
|
|
8
|
+
t.timestamps
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
class CreateNextSgesInscriptions < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_inscriptions do |t|
|
|
4
|
+
t.string :student_name
|
|
5
|
+
t.datetime :student_birthday
|
|
6
|
+
t.string :student_nationality
|
|
7
|
+
t.integer :student_indentification_type, default: 0, null: false
|
|
8
|
+
t.string :student_ientification_number
|
|
9
|
+
t.string :student_address
|
|
10
|
+
t.string :parent_name
|
|
11
|
+
t.datetime :parent_birthday
|
|
12
|
+
t.string :parent_nationality
|
|
13
|
+
t.integer :parent_indentification_type, default: 0, null: false
|
|
14
|
+
t.string :parent_ientification_number
|
|
15
|
+
t.string :parent_address
|
|
16
|
+
t.string :parent_cellphone1
|
|
17
|
+
t.string :parent_cellphone2
|
|
18
|
+
t.string :parent_email
|
|
19
|
+
t.string :documents
|
|
20
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
21
|
+
|
|
22
|
+
t.timestamps
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class CreateJoinTableInscriptionCollectionType < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_join_table :inscriptions, :collection_types do |t|
|
|
4
|
+
t.index [:inscription_id, :collection_type_id], name: 'ndx_cllctn_tps_nscrptns_n_nscrptn_d_nd_cllctn_tp_d'
|
|
5
|
+
# t.index [:collection_type_id, :inscription_id]
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
class CreateJoinTableStudentCollectionType < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_join_table :next_sges_students, :next_sges_collection_types do |t|
|
|
4
|
+
t.index [:next_sges_student_id, :next_sges_collection_type_id], name: 'idx_cllctn_types_students_on_student_id_and_collection_type_id'
|
|
5
|
+
# t.index [:collection_type_id, :student_id]
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class CreateNextSgesCollectionNoteItems < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_collection_note_items do |t|
|
|
4
|
+
t.string :name
|
|
5
|
+
t.text :description
|
|
6
|
+
t.decimal :base_value, default: 0, null: false
|
|
7
|
+
t.decimal :value, default: 0, null: false
|
|
8
|
+
t.integer :quantity, default: 1, null: false
|
|
9
|
+
t.datetime :date
|
|
10
|
+
t.string :discount_description
|
|
11
|
+
t.decimal :discount_percentage, default: 0, null: false
|
|
12
|
+
t.decimal :discount_value, default: 0, null: false
|
|
13
|
+
t.string :fine_description
|
|
14
|
+
t.decimal :fine_percentage, default: 0, null: false
|
|
15
|
+
t.decimal :fine_value, default: 0, null: false
|
|
16
|
+
t.integer :collection_type_frequency, default: 0, null: false
|
|
17
|
+
t.integer :collection_type_category, default: 0, null: false
|
|
18
|
+
t.references :collection_note, foreign_key: {to_table: :next_sges_collection_notes}, index: true
|
|
19
|
+
t.references :collection_type, foreign_key: {to_table: :next_sges_collection_types}, index: true
|
|
20
|
+
t.references :student, foreign_key: {to_table: :next_sges_students}, index: true
|
|
21
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
22
|
+
|
|
23
|
+
t.timestamps
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
class AddDiscountAdFineToCollectionType < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
add_column :next_sges_collection_types, :first_fine_percentage, :decimal, default: 0, null: false
|
|
4
|
+
add_column :next_sges_collection_types, :first_fine_after, :integer, default: 0, null: false
|
|
5
|
+
add_column :next_sges_collection_types, :second_fine_percentage, :decimal, default: 0, null: false
|
|
6
|
+
add_column :next_sges_collection_types, :second_fine_after, :integer, default: 0, null: false
|
|
7
|
+
add_column :next_sges_collection_types, :charge_automatically, :boolean, default: false, null: false
|
|
8
|
+
add_column :next_sges_collection_types, :status, :integer, default: 0, null: false
|
|
9
|
+
add_column :next_sges_collection_types, :second_child_discount, :decimal, default: 0, null: false
|
|
10
|
+
add_column :next_sges_collection_types, :third_child_discount, :decimal, default: 0, null: false
|
|
11
|
+
add_column :next_sges_collection_types, :anual_payment_discount, :decimal, default: 0, null: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class AddAccountBalanceToNextSgesParents < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
add_column :next_sges_parents, :avatar, :string
|
|
4
|
+
add_column :next_sges_parents, :account_balance, :decimal, default: 0, null: false
|
|
5
|
+
add_column :next_sges_parents, :address, :string
|
|
6
|
+
add_column :next_sges_parents, :identification_type, :integer, default: 0, null: false
|
|
7
|
+
add_column :next_sges_parents, :identification_number, :string
|
|
8
|
+
add_column :next_sges_parents, :job_title, :string
|
|
9
|
+
|
|
10
|
+
add_column :next_sges_students, :relation, :integer, default: 0, null: false
|
|
11
|
+
add_column :next_sges_students, :identification_type, :integer, default: 0, null: false
|
|
12
|
+
add_column :next_sges_students, :identification_number, :string
|
|
13
|
+
add_column :next_sges_students, :address, :string
|
|
14
|
+
add_column :next_sges_students, :avatar, :string
|
|
15
|
+
add_column :next_sges_students, :birth_date, :datetime
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
class AddNifToNextSgesSchools < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
add_column :next_sges_schools, :nif, :string
|
|
4
|
+
add_column :next_sges_schools, :back_name, :string
|
|
5
|
+
add_column :next_sges_schools, :back_account_number, :string
|
|
6
|
+
add_column :next_sges_schools, :back_account_iban, :string
|
|
7
|
+
add_column :next_sges_schools, :county, :string
|
|
8
|
+
add_column :next_sges_schools, :province, :string
|
|
9
|
+
add_column :next_sges_schools, :country, :string
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class CreateNextSgesResponsibleOthers < ActiveRecord::Migration[5.1]
|
|
2
|
+
def change
|
|
3
|
+
create_table :next_sges_responsible_others do |t|
|
|
4
|
+
t.string :first_name
|
|
5
|
+
t.string :middle_name
|
|
6
|
+
t.string :last_name
|
|
7
|
+
t.string :avatar
|
|
8
|
+
t.json :documents
|
|
9
|
+
t.integer :relation_to_parent, default: 0, null: false
|
|
10
|
+
t.references :parent, foreign_key: {to_table: :next_sges_parents}, index: true
|
|
11
|
+
t.integer :status, default: 0, null: false
|
|
12
|
+
t.references :school, foreign_key: {to_table: :next_sges_schools}, index: true
|
|
13
|
+
t.datetime :birthday
|
|
14
|
+
t.integer :identification_type, default: 0, null: false
|
|
15
|
+
t.string :identification_number
|
|
16
|
+
t.string :email
|
|
17
|
+
t.string :cellphone
|
|
18
|
+
t.string :address
|
|
19
|
+
t.string :number
|
|
20
|
+
|
|
21
|
+
t.timestamps
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|