Skip to content

Commit

Permalink
feat :: 공지 글 response dto
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoochanhong committed Apr 7, 2024
1 parent 1206d19 commit 6e53668
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions lib/data/dto/response/notice_response.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import 'package:lotura/domain/entity/notice_entity.dart';

class NoticeResponse {
final int id;
final String title;
final String contents;
final String date;

NoticeResponse({
required this.id,
required this.title,
required this.contents,
required this.date,
});

factory NoticeResponse.fromJson(Map<String, dynamic> json) {
return NoticeResponse(
id: json['id'],
title: json['title'],
contents: json['contents'],
date: json['date'],
);
}

NoticeEntity toEntity() {
return NoticeEntity(
title: title,
contents: contents,
date: date,
);
}
}

0 comments on commit 6e53668

Please sign in to comment.