- 添加物品分类、位置、购买日期等新字段 - 实现物品是否使用的Radio选择功能 - 增加价格输入框并限制输入格式 - 优化表单布局,添加适当间距 - 更新Item模型以支持新字段 -调整数据库操作以适应新数据结构
29 lines
465 B
Dart
29 lines
465 B
Dart
class Item {
|
|
int? id;
|
|
// 名称
|
|
String name;
|
|
// 分类
|
|
int? categoryId;
|
|
// 位置
|
|
int? locationId;
|
|
// 描述
|
|
String? description;
|
|
// 购买日期
|
|
String? purchaseDate;
|
|
// 是否使用
|
|
int? isInUse;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
|
|
Item({
|
|
this.id,
|
|
required this.name,
|
|
this.categoryId,
|
|
this.locationId,
|
|
this.description,
|
|
this.purchaseDate,
|
|
this.isInUse,
|
|
this.createdAt,
|
|
this.updatedAt,
|
|
});
|
|
} |