98 lines
1.9 KiB
Java
98 lines
1.9 KiB
Java
package com.example.myapplication.model;
|
|
|
|
import androidx.room.Entity;
|
|
import androidx.room.PrimaryKey;
|
|
|
|
@Entity(tableName = "audio_entities")
|
|
public class AudioEntity {
|
|
@PrimaryKey(autoGenerate = true)
|
|
private int id;
|
|
|
|
private String fileName;
|
|
public String AudioPath;
|
|
|
|
public AudioEntity() {
|
|
}
|
|
|
|
public String ImagePath;
|
|
|
|
public String getTime() {
|
|
return time;
|
|
}
|
|
|
|
public void setTime(String time) {
|
|
this.time = time;
|
|
}
|
|
|
|
private long fileSize;
|
|
public String time;
|
|
|
|
public AudioEntity(String audioPath, String imagePath,String time) {
|
|
this.AudioPath = audioPath;
|
|
this.ImagePath = imagePath;
|
|
this.time=time;
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(int id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getFileName() {
|
|
return fileName;
|
|
}
|
|
|
|
public void setFileName(String fileName) {
|
|
this.fileName = fileName;
|
|
}
|
|
|
|
public String getAudioPath() {
|
|
return AudioPath;
|
|
}
|
|
|
|
public void setAudioPath(String audioPath) {
|
|
AudioPath = audioPath;
|
|
}
|
|
|
|
public String getImagePath() {
|
|
return ImagePath;
|
|
}
|
|
|
|
public void setImagePath(String imagePath) {
|
|
ImagePath = imagePath;
|
|
}
|
|
|
|
public long getFileSize() {
|
|
return fileSize;
|
|
}
|
|
|
|
public void setFileSize(long fileSize) {
|
|
this.fileSize = fileSize;
|
|
}
|
|
|
|
public long getDuration() {
|
|
return duration;
|
|
}
|
|
|
|
public void setDuration(long duration) {
|
|
this.duration = duration;
|
|
}
|
|
|
|
public long getCreatedAt() {
|
|
return createdAt;
|
|
}
|
|
|
|
public void setCreatedAt(long createdAt) {
|
|
this.createdAt = createdAt;
|
|
}
|
|
|
|
private long duration; // 音频时长(毫秒)
|
|
private long createdAt; // 创建时间戳
|
|
|
|
// 构造方法、getter 和 setter
|
|
|
|
|
|
} |