|
|
@ -0,0 +1,45 @@ |
|
|
|
package com.storeroom.modules.device.domain; |
|
|
|
|
|
|
|
|
|
|
|
import com.storeroom.base.BaseEntity; |
|
|
|
import io.swagger.annotations.ApiModelProperty; |
|
|
|
import lombok.Getter; |
|
|
|
import lombok.Setter; |
|
|
|
|
|
|
|
import javax.persistence.Column; |
|
|
|
import javax.persistence.Entity; |
|
|
|
import javax.persistence.Id; |
|
|
|
import javax.persistence.Table; |
|
|
|
import javax.validation.constraints.NotNull; |
|
|
|
import java.io.Serializable; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@Entity |
|
|
|
@Getter |
|
|
|
@Setter |
|
|
|
@Table(name = "device_type") |
|
|
|
public class DeviceType extends BaseEntity implements Serializable { |
|
|
|
|
|
|
|
@Id |
|
|
|
@Column(name = "id") |
|
|
|
@NotNull(groups = Update.class) |
|
|
|
@ApiModelProperty(value = "ID", hidden = true) |
|
|
|
private String id; |
|
|
|
|
|
|
|
@Column(name = "name") |
|
|
|
@ApiModelProperty(value = "类型名称",hidden = true) |
|
|
|
private String name; |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean equals(Object o) { |
|
|
|
if (this == o) return true; |
|
|
|
if (o == null || getClass() != o.getClass()) return false; |
|
|
|
DeviceType that = (DeviceType) o; |
|
|
|
return Objects.equals(id, that.id) && Objects.equals(name, that.name); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public int hashCode() { |
|
|
|
return Objects.hash(id, name); |
|
|
|
} |
|
|
|
} |