66 lines
1.3 KiB
Dart
66 lines
1.3 KiB
Dart
import 'package:equatable/equatable.dart';
|
|
import 'package:floor/floor.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
import 'package:pj_supermarket_cloud/common/models/index.dart';
|
|
|
|
part 'classify_entity.g.dart';
|
|
|
|
@JsonSerializable()
|
|
@Entity(tableName: "classify")
|
|
class ClassifyEntity extends Equatable {
|
|
/// 自增ID
|
|
@PrimaryKey(autoGenerate: true)
|
|
int? id;
|
|
|
|
/// 服务端唯一标识
|
|
final String serviceUniqueCode;
|
|
|
|
/// 平台类型
|
|
final SysType sysType;
|
|
|
|
/// 分类名
|
|
final String name;
|
|
|
|
/// 用餐类型,早餐、中餐、晚餐
|
|
final String categoryType;
|
|
|
|
/// 排序 倒序排列
|
|
final int sort;
|
|
|
|
/// 创建时间
|
|
final DateTime createTime;
|
|
|
|
/// 同步时间
|
|
final DateTime updateTime;
|
|
|
|
/// 是否删除
|
|
final bool delFlag;
|
|
|
|
ClassifyEntity({
|
|
this.id,
|
|
required this.serviceUniqueCode,
|
|
required this.sysType,
|
|
required this.name,
|
|
required this.categoryType,
|
|
required this.sort,
|
|
required this.createTime,
|
|
required this.updateTime,
|
|
required this.delFlag,
|
|
});
|
|
|
|
factory ClassifyEntity.fromJson(Map<String, dynamic> json) =>
|
|
_$ClassifyEntityFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$ClassifyEntityToJson(this);
|
|
|
|
@override
|
|
List<Object?> get props => [
|
|
serviceUniqueCode,
|
|
sysType,
|
|
name,
|
|
categoryType,
|
|
sort,
|
|
];
|
|
}
|