38 lines
1.0 KiB
Dart
38 lines
1.0 KiB
Dart
|
|
// 功能描述:一级页面使用的不可变领域数据,金额统一为整数分。
|
|||
|
|
// 版本:1.0.0
|
|||
|
|
|
|||
|
|
/// 已发布内容;正文和版本由内容后台维护。
|
|||
|
|
class PublishedContent {
|
|||
|
|
const PublishedContent({
|
|||
|
|
required this.identity,
|
|||
|
|
required this.title,
|
|||
|
|
required this.body,
|
|||
|
|
required this.type,
|
|||
|
|
required this.version,
|
|||
|
|
this.publishedAt,
|
|||
|
|
});
|
|||
|
|
final String identity, title, body, type;
|
|||
|
|
final int version;
|
|||
|
|
final DateTime? publishedAt;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// 商品公开摘要,只使用公开标识和服务端价格库存。
|
|||
|
|
class ProductSummary {
|
|||
|
|
const ProductSummary({
|
|||
|
|
required this.identity,
|
|||
|
|
required this.name,
|
|||
|
|
required this.price,
|
|||
|
|
required this.stock,
|
|||
|
|
this.category = '',
|
|||
|
|
this.imageUrl = '',
|
|||
|
|
});
|
|||
|
|
final String identity, name, category, imageUrl;
|
|||
|
|
final int price, stock;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// 有效服务归属;配送点为空表示气站直接服务。
|
|||
|
|
class ServiceRelation {
|
|||
|
|
const ServiceRelation({required this.gasName, required this.deliveryName});
|
|||
|
|
final String gasName, deliveryName;
|
|||
|
|
}
|