FactoryBot.define do factory :crew_time, class: 'Ecom::Model::CrewTime' do date { Date.today } checkin_time { Time.now } checkout_time { Time.now + 2 * 60 * 60 } association :crew remark { FFaker::Name.name } overtime { false } end end