34 lines
987 B
Java
34 lines
987 B
Java
package com.onekeycall.videotablet.entity;
|
||
|
||
import lombok.Data;
|
||
import org.springframework.data.annotation.Id;
|
||
import org.springframework.data.mongodb.core.index.Indexed;
|
||
import org.springframework.data.mongodb.core.mapping.Document;
|
||
import org.springframework.data.mongodb.core.mapping.Field;
|
||
|
||
import java.util.Date;
|
||
import java.util.List;
|
||
|
||
@Data
|
||
@Document(collection = "device_apks") // 指定MongoDB集合名
|
||
public class DeviceApkInfo {
|
||
|
||
@Id
|
||
private String id; // MongoDB文档ID
|
||
|
||
@Indexed
|
||
@Field("sn")
|
||
private String sn; // 设备序列号
|
||
|
||
@Field("apk_list") // 指定数据库中字段名称为apk_list
|
||
private List<ApkInfo> apkList; // APK信息列表
|
||
|
||
@Field("create_time")
|
||
private Date createTime; // 记录创建时间
|
||
|
||
@Field("update_time")
|
||
private Date updateTime; // 记录最后更新时间
|
||
|
||
// 构造方法、Getter和Setter省略(实际开发中必须要有)
|
||
// 推荐使用Lombok的@Getter和@Setter简化代码
|
||
} |