- create gw_events, crew_gw_participations, gw_crew_scores, gw_individual_scores - add models, blueprints, controllers for GW tracking - add model specs and gw_events controller specs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
751 B
Ruby
29 lines
751 B
Ruby
FactoryBot.define do
|
|
factory :gw_crew_score do
|
|
crew_gw_participation
|
|
round { :preliminaries }
|
|
crew_score { Faker::Number.between(from: 100_000, to: 10_000_000) }
|
|
opponent_score { nil }
|
|
opponent_name { nil }
|
|
opponent_granblue_id { nil }
|
|
victory { nil }
|
|
|
|
trait :with_opponent do
|
|
opponent_score { Faker::Number.between(from: 100_000, to: 10_000_000) }
|
|
opponent_name { Faker::Team.name }
|
|
opponent_granblue_id { Faker::Number.number(digits: 8).to_s }
|
|
end
|
|
|
|
trait :victory do
|
|
with_opponent
|
|
crew_score { 10_000_000 }
|
|
opponent_score { 5_000_000 }
|
|
end
|
|
|
|
trait :defeat do
|
|
with_opponent
|
|
crew_score { 5_000_000 }
|
|
opponent_score { 10_000_000 }
|
|
end
|
|
end
|
|
end
|