You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
705 B
TypeScript
54 lines
705 B
TypeScript
import {Column, Entity, PrimaryGeneratedColumn} from 'typeorm'
|
|
|
|
@Entity('sets')
|
|
export default class GymSet {
|
|
@PrimaryGeneratedColumn()
|
|
id?: number
|
|
|
|
@Column('text')
|
|
name: string
|
|
|
|
@Column('int')
|
|
reps: number
|
|
|
|
@Column('int')
|
|
weight: number
|
|
|
|
@Column('int')
|
|
sets = 3
|
|
|
|
@Column('int')
|
|
minutes = 3
|
|
|
|
@Column('int')
|
|
seconds = 30
|
|
|
|
@Column('boolean')
|
|
hidden = false
|
|
|
|
@Column('text')
|
|
created: string
|
|
|
|
@Column('text')
|
|
unit: string
|
|
|
|
@Column('text')
|
|
image: string
|
|
|
|
@Column('text')
|
|
steps?: string
|
|
}
|
|
|
|
export const defaultSet: GymSet = {
|
|
created: '',
|
|
name: '',
|
|
image: '',
|
|
hidden: false,
|
|
minutes: 3,
|
|
seconds: 30,
|
|
reps: 0,
|
|
sets: 0,
|
|
unit: 'kg',
|
|
weight: 0,
|
|
}
|