28 lines
557 B
JavaScript
28 lines
557 B
JavaScript
|
|
const EntitySchema = require("typeorm").EntitySchema;
|
||
|
|
|
||
|
|
module.exports = new EntitySchema({
|
||
|
|
name: "WeightRecord",
|
||
|
|
tableName: "weight_records",
|
||
|
|
columns: {
|
||
|
|
id: {
|
||
|
|
primary: true,
|
||
|
|
type: "int",
|
||
|
|
generated: true
|
||
|
|
},
|
||
|
|
date: {
|
||
|
|
type: "date"
|
||
|
|
},
|
||
|
|
weight: {
|
||
|
|
type: "float"
|
||
|
|
},
|
||
|
|
unit: {
|
||
|
|
type: "varchar",
|
||
|
|
length: 10
|
||
|
|
},
|
||
|
|
createdAt: {
|
||
|
|
type: "timestamp",
|
||
|
|
createDate: true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|