123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- package com.futu.course.user.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 java.util.Date;
- import lombok.Data;
- /**
- * 用户和优惠券关联表
- * @TableName user_coupon
- */
- @TableName(value ="user_coupon")
- @Data
- public class UserCoupon implements Serializable {
- /**
- *
- */
- @TableId
- private Long id;
- /**
- *
- */
- private Long userId;
- /**
- *
- */
- private Long couponId;
- /**
- * 0-未使用 1-已使用
- */
- private Integer status;
- /**
- *
- */
- private Date getTime;
- @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.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
- && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
- && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
- && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
- && (this.getGetTime() == null ? other.getGetTime() == null : this.getGetTime().equals(other.getGetTime()));
- }
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
- result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
- result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
- result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
- result = prime * result + ((getGetTime() == null) ? 0 : getGetTime().hashCode());
- return result;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", id=").append(id);
- sb.append(", userId=").append(userId);
- sb.append(", couponId=").append(couponId);
- sb.append(", status=").append(status);
- sb.append(", getTime=").append(getTime);
- sb.append(", serialVersionUID=").append(serialVersionUID);
- sb.append("]");
- return sb.toString();
- }
- }
|