Add Salary model. Needs testing and then devs.
This commit is contained in:
1 parent
c7ee97139e
commit
c629b42d57
5 files changed
+40
-1
No files matched your search
@@ -0,0 +1,2 @@
|
||||
class Salary < ApplicationRecord
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
class CreateSalaries < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :salaries do |t|
|
||||
t.integer :year
|
||||
t.float :hourly_rate
|
||||
t.json :hour_table
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
+9
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2020_09_09_112404) do
|
||||
ActiveRecord::Schema.define(version: 2020_10_01_160115) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@@ -41,6 +41,14 @@ ActiveRecord::Schema.define(version: 2020_09_09_112404) do
|
||||
t.index ["unlock_token"], name: "index_admins_on_unlock_token", unique: true
|
||||
end
|
||||
|
||||
create_table "salaries", force: :cascade do |t|
|
||||
t.integer "year"
|
||||
t.float "hourly_rate"
|
||||
t.json "hour_table"
|
||||
t.datetime "created_at", precision: 6, null: false
|
||||
t.datetime "updated_at", precision: 6, null: false
|
||||
end
|
||||
|
||||
create_table "tax_references", force: :cascade do |t|
|
||||
t.integer "year"
|
||||
t.float "hourly_wage"
|
||||
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
year:
|
||||
hourly_rate: 1.5
|
||||
hour_table:
|
||||
|
||||
two:
|
||||
year:
|
||||
hourly_rate: 1.5
|
||||
hour_table:
|
||||
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class SalaryTest < ActiveSupport::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
Reference in new issue
Block a user