车辆实训记录 - 数据模型与 Proto 定义
车辆实训记录 - 数据模型与 Proto 定义
Java 数据模型
/**
* 车辆实训记录
* @TableName car_real_record
*/
@Data
@ToString
@ProtobufClass
public class CarRealRecord implements Serializable {
/**
* 车辆实训记录编号
*/
private Long carRealRecordId;
/**
* 流动站编号(车-车牌/手动挡)
*/
private Long mobileDeviceId;
/**
* 上线日期(2023-08-30 10:00:00)
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date onlineDatetime;
/**
* 离线日期(2023-08-30 10:00:00)
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date offlineDatetime;
/**
* 时长(60分钟)
*/
private Integer totalTime;
/**
* 练车人数
*/
private Integer driversNum;
/**
* 总观看人数
*/
private Integer viewers;
/**
* 总点赞数
*/
private Integer likes;
/**
* 训练场编号
*/
private Long trainingGroundId;
/**
* 练车类型(手动挡/自动挡)
*/
private String drivingType;
/**
* 视频回放文件地址(文件夹)-D:\实训记录文件\流动站编号(车)\2023-08-31\车辆实训记录编号
*/
private String videoPlaybackPath;
private static final long serialVersionUID = 1L;
}
ProtoBuf 定义
syntax = "proto3";
message CarRealRecord {
int64 carRealRecordId = 1;
int64 mobileDeviceId = 2;
string onlineDatetime = 3;
string offlineDatetime = 4;
int32 totalTime = 5;
int32 driversNum = 6;
int32 viewers = 7;
int32 likes = 8;
int64 trainingGroundId = 9;
string drivingType = 10;
string videoPlaybackPath = 11;
}
字段解释
| 字段名 | 类型 | 说明 |
|---|---|---|
| carRealRecordId | Long | 车辆实训记录编号 |
| mobileDeviceId | Long | 流动站编号(车-车牌/手动挡) |
| onlineDatetime | Date | 上线日期 |
| offlineDatetime | Date | 离线日期 |
| totalTime | Integer | 时长(分钟) |
| driversNum | Integer | 练车人数 |
| viewers | Integer | 总观看人数 |
| likes | Integer | 总点赞数 |
| trainingGroundId | Long | 训练场编号 |
| drivingType | String | 练车类型(手动挡/自动挡) |
| videoPlaybackPath | String | 视频回放文件地址(文件夹) |
使用说明
- 数据模型使用 Java 语言定义,并使用
@Data,@ToString和@ProtobufClass注解方便使用和序列化。 - ProtoBuf 定义用于将数据模型序列化成二进制格式,方便数据传输和存储。
- 开发者可以使用该数据模型和 ProtoBuf 定义,方便地进行车辆实训数据的开发和使用。
原文地址: http://www.cveoy.top/t/topic/m8Ts 著作权归作者所有。请勿转载和采集!