Skip to content

Commit 15a25f0

Browse files
committed
add DTOs
1 parent f3902ff commit 15a25f0

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.iluwatar.cqrs.dto;
2+
3+
public class AuthorDTO {
4+
5+
private String name;
6+
private String email;
7+
private String username;
8+
9+
public AuthorDTO(String name, String email, String username) {
10+
super();
11+
this.name = name;
12+
this.email = email;
13+
this.username = username;
14+
}
15+
16+
public AuthorDTO() {
17+
super();
18+
}
19+
20+
public String getName() {
21+
return name;
22+
}
23+
24+
public String getEmail() {
25+
return email;
26+
}
27+
28+
public String getUsername() {
29+
return username;
30+
}
31+
32+
@Override
33+
public String toString() {
34+
return "AuthorDTO [name=" + name + ", email=" + email + ", username=" + username + "]";
35+
}
36+
37+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.iluwatar.cqrs.dto;
2+
3+
public class BookDTO {
4+
5+
private String title;
6+
private double price;
7+
8+
public BookDTO(String title, double price) {
9+
super();
10+
this.title = title;
11+
this.price = price;
12+
}
13+
14+
public BookDTO() {
15+
super();
16+
}
17+
18+
public String getTitle() {
19+
return title;
20+
}
21+
22+
public double getPrice() {
23+
return price;
24+
}
25+
26+
}

0 commit comments

Comments
 (0)