-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
feat(cp/oa): add phonenumber field to ContentValue for PhoneNumber control #3973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,20 @@ public class ContentValue implements Serializable { | |
| @SerializedName("bank_account") | ||
| private BankAccount bankAccount; | ||
|
|
||
| @SerializedName("phonenumber") | ||
| private PhoneNumber phonenumber; | ||
|
|
||
| /** | ||
| * Phone number control value: {@code value.phonenumber = { area, number }}. | ||
| * e.g. area="+62", number="87827717730" | ||
| */ | ||
| @Data | ||
| public static class PhoneNumber implements Serializable { | ||
| private static final long serialVersionUID = 1L; | ||
| private String area; | ||
| private String number; | ||
| } | ||
|
Comment on lines
+64
to
+76
|
||
|
|
||
| /** | ||
| * The type Date. | ||
| */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
字段名
phonenumber不符合本类其他字段的驼峰命名风格(如newNumber、bankAccount等),会导致生成的 getter/setter 为getPhonenumber/setPhonenumber,对 Java 调用方不够一致。建议将字段改为phoneNumber(保持@SerializedName("phonenumber")不变);如确实需要兼容getPhonenumber()命名,可额外提供一个委托方法作为别名。