import 'dart:convert';

/// 标签列表 Request
class TagRequest {
  String categoryCode;
  String channelCode;
  String tag;
  String keyword;
  String newsId;

  TagRequest({
    required this.categoryCode,
    required this.channelCode,
    required this.tag,
    required this.keyword,
    required this.newsId,
  });

  factory TagRequest.fromRawJson(String str) => TagRequest.fromJson(json.decode(str));

  String toRawJson() => json.encode(toJson());

  factory TagRequest.fromJson(Map<String, dynamic> json) => TagRequest(
    categoryCode: json["categoryCode"],
    channelCode: json["channelCode"],
    tag: json["tag"],
    keyword: json["keyword"],
    newsId: json["newsID"],
  );

  Map<String, dynamic> toJson() => {
    "categoryCode": categoryCode,
    "channelCode": channelCode,
    "tag": tag,
    "keyword": keyword,
    "newsID": newsId,
  };
}


/// 标签列表 Response
class TagResponse {
  String? tag;

  TagResponse({
    this.tag,
  });

  factory TagResponse.fromRawJson(String str) => TagResponse.fromJson(json.decode(str));

  String toRawJson() => json.encode(toJson());

  factory TagResponse.fromJson(Map<String, dynamic> json) => TagResponse(
    tag: json["tag"],
  );

  Map<String, dynamic> toJson() => {
    "tag": tag,
  };
}

