Massive/gym-set.ts

58 lines
892 B
TypeScript
Raw Normal View History

import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
2023-10-18 06:06:13 +00:00
export const GYM_SET_UPDATED = "gym-set-updated";
export const GYM_SET_DELETED = "gym-set-deleted";
export const GYM_SET_CREATED = "gym-set-created";
@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,
};