86 lines
1.6 KiB
Dart
86 lines
1.6 KiB
Dart
import 'package:floor/floor.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
import 'package:pj_supermarket_cloud/common/index.dart';
|
|
|
|
part 'broadcast_entity.g.dart';
|
|
|
|
@JsonSerializable()
|
|
@Entity(tableName: "broadcast")
|
|
class BroadcastEntity {
|
|
/// 自增ID
|
|
@PrimaryKey(autoGenerate: true)
|
|
int? id;
|
|
|
|
/// 广播内容
|
|
String content;
|
|
|
|
/// 当前广播次数
|
|
int broadcastCount;
|
|
|
|
/// 最大广播次数
|
|
int broadcastMaxCount;
|
|
|
|
/// 是否广播语音
|
|
bool isBroadcast;
|
|
|
|
/// 是否完成
|
|
bool isDone;
|
|
|
|
/// 完成时间
|
|
DateTime? isDoneTime;
|
|
|
|
/// 服务单号
|
|
String serviceCode;
|
|
|
|
/// 服务订单号
|
|
String serviceOrderCode;
|
|
|
|
/// 用户id
|
|
String userId;
|
|
|
|
/// 用户姓名
|
|
String username;
|
|
|
|
/// 用户手机号
|
|
String userMobile;
|
|
|
|
/// 商品介绍
|
|
String productDesc;
|
|
|
|
/// 支付价格
|
|
int payPrice;
|
|
|
|
/// 菜品时间类型
|
|
ProductHourType? hourType;
|
|
|
|
/// 手动开关
|
|
bool enable;
|
|
|
|
/// 创建时间
|
|
DateTime createTime;
|
|
|
|
BroadcastEntity({
|
|
this.id,
|
|
required this.content,
|
|
required this.broadcastCount,
|
|
required this.broadcastMaxCount,
|
|
required this.isBroadcast,
|
|
required this.isDone,
|
|
required this.createTime,
|
|
required this.serviceCode,
|
|
required this.serviceOrderCode,
|
|
required this.userId,
|
|
required this.username,
|
|
required this.userMobile,
|
|
required this.productDesc,
|
|
required this.payPrice,
|
|
this.hourType,
|
|
required this.enable,
|
|
});
|
|
|
|
factory BroadcastEntity.fromJson(Map<String, dynamic> json) =>
|
|
_$BroadcastEntityFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$BroadcastEntityToJson(this);
|
|
}
|