34 lines
701 B
Dart
34 lines
701 B
Dart
import 'package:floor/floor.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'setting_entity.g.dart';
|
|
|
|
@JsonSerializable()
|
|
@Entity(tableName: "setting")
|
|
class SettingEntity {
|
|
/// 自增ID
|
|
@PrimaryKey(autoGenerate: true)
|
|
int? id;
|
|
|
|
/// 用户信息
|
|
String userJson;
|
|
|
|
/// 设备信息
|
|
String sysJson;
|
|
|
|
/// 食堂额外金额信息
|
|
String? canteenExtraPriceConfigJson;
|
|
|
|
SettingEntity({
|
|
this.id,
|
|
required this.userJson,
|
|
required this.sysJson,
|
|
this.canteenExtraPriceConfigJson,
|
|
});
|
|
|
|
factory SettingEntity.fromJson(Map<String, dynamic> json) =>
|
|
_$SettingEntityFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$SettingEntityToJson(this);
|
|
}
|