feat(train): strength plans and sessions (ADR 0035)
Strength plans of exercises from a catalogue or the person's own, in blocks of one exercise or several done in turn (supersets, circuits), each with its sets, reps or seconds, weights and rests; each a sealed `strength_plan` row. Plans are marked with what the place chosen lacks, and a session offers swaps moving the same way that the place allows. A session runs on every device, set by set with the rest counted down, each weight made up from the place's plates, bars and fixed weights with the plate changes between sets, kept in strength_session.json after each change so one cut off is carried on, and saved as a workout of the new activity Strength with its sets, listed on its page; strength training in Health Connect and FIT, no GPX. Migration 20261102113104496-strength-plans is purely additive: it creates the table strength_plan (id uuid v7, spaceId, keyId, the sealed payload and its nonce), its index on spaceId, and a foreign key to offline_sync_spaces with ON DELETE CASCADE, so deleting a person's sync spaces deletes their plans; then the modules' version rows. The gen_random_uuid_v7 function is created or replaced as in every migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
064b911aa2
commit
508994be3a
1 changed files with 27612 additions and 25 deletions
|
|
@ -50,6 +50,7 @@ object HealthRecords {
|
|||
"hiking" -> ExerciseSessionRecord.EXERCISE_TYPE_HIKING
|
||||
"cycling" -> ExerciseSessionRecord.EXERCISE_TYPE_BIKING
|
||||
"indoorRowing" -> ExerciseSessionRecord.EXERCISE_TYPE_ROWING_MACHINE
|
||||
"strength" -> ExerciseSessionRecord.EXERCISE_TYPE_STRENGTH_TRAINING
|
||||
else -> ExerciseSessionRecord.EXERCISE_TYPE_OTHER_WORKOUT
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue