1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package com.futu.course.orders.domain;
- import com.baomidou.mybatisplus.annotation.IdType;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableId;
- import com.baomidou.mybatisplus.annotation.TableName;
- import java.io.Serializable;
- import lombok.Data;
- /**
- *
- * @TableName user_coupon
- */
- @TableName(value ="user_coupon")
- @Data
- public class UserCoupon implements Serializable {
- /**
- *
- */
- @TableId
- private Long userId;
- /**
- *
- */
- private Long couponId;
- @TableField(exist = false)
- private static final long serialVersionUID = 1L;
- @Override
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
- if (that == null) {
- return false;
- }
- if (getClass() != that.getClass()) {
- return false;
- }
- UserCoupon other = (UserCoupon) that;
- return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
- && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()));
- }
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
- result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
- return result;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", userId=").append(userId);
- sb.append(", couponId=").append(couponId);
- sb.append(", serialVersionUID=").append(serialVersionUID);
- sb.append("]");
- return sb.toString();
- }
- }
|