class Task < ApplicationRecord validates :name, presence: true validates :user, presence: true belongs_to :activity belongs_to :user has_many :records end