mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat(m7): add DeviceStatus enum and PlatformDevice/PlatformDeviceSnBinding/PlatformDeviceSwapRequest entities with mappers
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package cn.craftlabs.platform.api.domain;
|
||||||
|
|
||||||
|
public enum DeviceStatus {
|
||||||
|
ACTIVE, INACTIVE, DECOMMISSIONED
|
||||||
|
}
|
||||||
+129
@@ -0,0 +1,129 @@
|
|||||||
|
package cn.craftlabs.platform.api.persistence.device;
|
||||||
|
|
||||||
|
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.time.OffsetDateTime;
|
||||||
|
|
||||||
|
@TableName("platform_device")
|
||||||
|
public class PlatformDevice {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String mid;
|
||||||
|
|
||||||
|
private String alias;
|
||||||
|
|
||||||
|
private String site;
|
||||||
|
|
||||||
|
@TableField("customer_id")
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
@TableField("project_id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@TableField("first_seen_at")
|
||||||
|
private OffsetDateTime firstSeenAt;
|
||||||
|
|
||||||
|
@TableField("last_heartbeat_at")
|
||||||
|
private OffsetDateTime lastHeartbeatAt;
|
||||||
|
|
||||||
|
@TableField("created_at")
|
||||||
|
private OffsetDateTime createdAt;
|
||||||
|
|
||||||
|
@TableField("updated_at")
|
||||||
|
private OffsetDateTime updatedAt;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMid() {
|
||||||
|
return mid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMid(String mid) {
|
||||||
|
this.mid = mid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAlias() {
|
||||||
|
return alias;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlias(String alias) {
|
||||||
|
this.alias = alias;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSite() {
|
||||||
|
return site;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSite(String site) {
|
||||||
|
this.site = site;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCustomerId() {
|
||||||
|
return customerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomerId(Long customerId) {
|
||||||
|
this.customerId = customerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProjectId() {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProjectId(Long projectId) {
|
||||||
|
this.projectId = projectId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getFirstSeenAt() {
|
||||||
|
return firstSeenAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFirstSeenAt(OffsetDateTime firstSeenAt) {
|
||||||
|
this.firstSeenAt = firstSeenAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getLastHeartbeatAt() {
|
||||||
|
return lastHeartbeatAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastHeartbeatAt(OffsetDateTime lastHeartbeatAt) {
|
||||||
|
this.lastHeartbeatAt = lastHeartbeatAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getUpdatedAt() {
|
||||||
|
return updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdatedAt(OffsetDateTime updatedAt) {
|
||||||
|
this.updatedAt = updatedAt;
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package cn.craftlabs.platform.api.persistence.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface PlatformDeviceMapper extends BaseMapper<PlatformDevice> {}
|
||||||
+88
@@ -0,0 +1,88 @@
|
|||||||
|
package cn.craftlabs.platform.api.persistence.device;
|
||||||
|
|
||||||
|
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.time.OffsetDateTime;
|
||||||
|
|
||||||
|
@TableName("platform_device_sn_binding")
|
||||||
|
public class PlatformDeviceSnBinding {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableField("device_id")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
@TableField("license_sn_id")
|
||||||
|
private Long licenseSnId;
|
||||||
|
|
||||||
|
@TableField("bind_type")
|
||||||
|
private String bindType;
|
||||||
|
|
||||||
|
@TableField("bind_at")
|
||||||
|
private OffsetDateTime bindAt;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@TableField("created_at")
|
||||||
|
private OffsetDateTime createdAt;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDeviceId() {
|
||||||
|
return deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceId(Long deviceId) {
|
||||||
|
this.deviceId = deviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLicenseSnId() {
|
||||||
|
return licenseSnId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLicenseSnId(Long licenseSnId) {
|
||||||
|
this.licenseSnId = licenseSnId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBindType() {
|
||||||
|
return bindType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBindType(String bindType) {
|
||||||
|
this.bindType = bindType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getBindAt() {
|
||||||
|
return bindAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBindAt(OffsetDateTime bindAt) {
|
||||||
|
this.bindAt = bindAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package cn.craftlabs.platform.api.persistence.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface PlatformDeviceSnBindingMapper extends BaseMapper<PlatformDeviceSnBinding> {}
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
package cn.craftlabs.platform.api.persistence.device;
|
||||||
|
|
||||||
|
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.time.OffsetDateTime;
|
||||||
|
|
||||||
|
@TableName("platform_device_swap_request")
|
||||||
|
public class PlatformDeviceSwapRequest {
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@TableField("old_device_id")
|
||||||
|
private Long oldDeviceId;
|
||||||
|
|
||||||
|
@TableField("new_mid")
|
||||||
|
private String newMid;
|
||||||
|
|
||||||
|
@TableField("sn_id")
|
||||||
|
private Long snId;
|
||||||
|
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@TableField("processed_by")
|
||||||
|
private String processedBy;
|
||||||
|
|
||||||
|
@TableField("processed_at")
|
||||||
|
private OffsetDateTime processedAt;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@TableField("created_at")
|
||||||
|
private OffsetDateTime createdAt;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOldDeviceId() {
|
||||||
|
return oldDeviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOldDeviceId(Long oldDeviceId) {
|
||||||
|
this.oldDeviceId = oldDeviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNewMid() {
|
||||||
|
return newMid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewMid(String newMid) {
|
||||||
|
this.newMid = newMid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSnId() {
|
||||||
|
return snId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSnId(Long snId) {
|
||||||
|
this.snId = snId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReason() {
|
||||||
|
return reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReason(String reason) {
|
||||||
|
this.reason = reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessedBy() {
|
||||||
|
return processedBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessedBy(String processedBy) {
|
||||||
|
this.processedBy = processedBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getProcessedAt() {
|
||||||
|
return processedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessedAt(OffsetDateTime processedAt) {
|
||||||
|
this.processedAt = processedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public OffsetDateTime getCreatedAt() {
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(OffsetDateTime createdAt) {
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package cn.craftlabs.platform.api.persistence.device;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface PlatformDeviceSwapRequestMapper extends BaseMapper<PlatformDeviceSwapRequest> {}
|
||||||
Reference in New Issue
Block a user