Order.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright 2016-2018 shardingsphere.io.
  3. * <p>
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. * </p>
  16. */
  17. package com.huojutech.sharding.entity;
  18. import java.util.Date;
  19. public final class Order {
  20. private long orderId;
  21. private String orderCode;
  22. private int userId;
  23. private String status;
  24. private Date gmtCreate;
  25. public long getOrderId() {
  26. return orderId;
  27. }
  28. public void setOrderId(final long orderId) {
  29. this.orderId = orderId;
  30. }
  31. public int getUserId() {
  32. return userId;
  33. }
  34. public void setUserId(final int userId) {
  35. this.userId = userId;
  36. }
  37. public String getStatus() {
  38. return status;
  39. }
  40. public void setStatus(final String status) {
  41. this.status = status;
  42. }
  43. @Override
  44. public String toString() {
  45. return String.format("order_id: %s, user_id: %s, status: %s", orderId, userId, status);
  46. }
  47. public String getOrderCode() {
  48. return orderCode;
  49. }
  50. public void setOrderCode(String orderCode) {
  51. this.orderCode = orderCode;
  52. }
  53. public Date getGmtCreate() {
  54. return gmtCreate;
  55. }
  56. public void setGmtCreate(Date gmtCreate) {
  57. this.gmtCreate = gmtCreate;
  58. }
  59. }