Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Commit

Permalink
field added for #20
Browse files Browse the repository at this point in the history
  • Loading branch information
podusowski committed May 12, 2017
1 parent 06748a1 commit f277fd5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
28 changes: 28 additions & 0 deletions training/migrations/0035_timers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-05-12 17:47
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('training', '0034_auto_20170312_0953'),
]

operations = [
migrations.CreateModel(
name='Timers',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time_started', models.DateTimeField(default=None, null=True)),
('time_finished', models.DateTimeField(default=None, null=True)),
('excercise', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='training.Excercise')),
],
options={
'ordering': ['pk'],
},
),
]
13 changes: 13 additions & 0 deletions training/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,19 @@ class Meta:
ordering = ['pk']


class Timers(models.Model):
'''
Timer based excercises tracks time instead of reps. Example
of such workout is plank.
'''
excercise = models.ForeignKey(Excercise)
time_started = models.DateTimeField(null=True, default=None)
time_finished = models.DateTimeField(null=True, default=None)

class Meta:
ordering = ['pk']


from django.db import models
from django.utils.six import with_metaclass

Expand Down

0 comments on commit f277fd5

Please sign in to comment.