Massive/gym-set.ts

54 lines
741 B
TypeScript
Raw Permalink Normal View History

import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("sets")
export default class GymSet {
@PrimaryGeneratedColumn()
2023-11-13 05:13:23 +00:00
id: number;
@Column("text")
name: string;
@Column("int")
reps: number;
@Column("int")
weight: number;
2023-11-13 05:13:23 +00:00
@Column("text")
created: string;
@Column("int")
sets = 3;
@Column("int")
minutes = 3;
@Column("int")
seconds = 30;
@Column("boolean")
hidden = false;
@Column("text")
2023-11-13 05:13:23 +00:00
unit = "kg";
@Column("text")
2023-11-13 05:13:23 +00:00
image: string | null;
@Column("text")
2023-11-13 05:13:23 +00:00
steps: string | null;
}
2022-11-04 03:02:06 +00:00
2023-11-13 05:13:23 +00:00
export const defaultSet: Partial<GymSet> = {
created: "",
name: "",
image: "",
2022-11-04 03:02:06 +00:00
hidden: false,
minutes: 3,
seconds: 30,
reps: 0,
sets: 0,
unit: "kg",
2022-11-04 03:02:06 +00:00
weight: 0,
};