Files
kuafu-health-manage/server/entity/WeightRecord.js
Kubbo 47306782a8 feat: 初始化前端和后端项目
- 创建前端项目结构,包括 Vue 3、Uni-app 等相关配置
- 添加后端项目结构,使用 Express 和 TypeORM 连接数据库
- 实现基本的体重记录 CRUD 功能
- 配置项目相关文件,如 .gitignore、.npmrc 等
2025-04-19 19:31:33 +08:00

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
}
}
});