Massive/weight.ts

23 lines
360 B
TypeScript
Raw Normal View History

2023-10-20 22:57:31 +00:00
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity("weights")
export default class Weight {
@PrimaryGeneratedColumn()
2023-11-13 05:13:23 +00:00
id: number;
2023-10-20 22:57:31 +00:00
@Column("int")
value: number;
@Column("text")
created: string;
@Column("text")
2023-11-13 05:13:23 +00:00
unit = "kg";
2023-10-20 22:57:31 +00:00
}
2023-11-13 05:13:23 +00:00
export const defaultWeight: Partial<Weight> = {
2023-10-20 22:57:31 +00:00
created: "",
unit: "kg",
value: 0,
};