chore: seed framework

This commit is contained in:
Nelson Jovel 2024-01-11 17:55:01 -08:00
parent cd7b05df73
commit 27550e0b30
10 changed files with 83 additions and 82 deletions

View file

@ -1,8 +1,8 @@
module Dashboard
class AdminDataValue < ApplicationRecord
belongs_to :school
belongs_to :dashboard_admin_data_item
belongs_to :dashboard_academic_year
belongs_to :school, class_name: "School", foreign_key: :dashboard_school_id
belongs_to :admin_data_item, class_name: "AdminDataItem", foreign_key: :dashboard_admin_data_item_id
belongs_to :academic_year, class_name: "AcademicYear", foreign_key: :dashboard_academic_year_id
validates :likert_score, numericality: { greater_than: 0, less_than_or_equal_to: 5 }
end