api/v1/attachment.proto
Attachment
附件
Field | Type | Label | Description |
---|---|---|---|
id | int64 | 附件ID | |
hash | string | 附件哈希值,MD5 | |
user_id | int64 | 上传用户ID | |
type_id | int64 | 附件类型ID,如果是文档类型,则为文档ID | |
type | int32 | 附件类型,见 web/utils/enum.js | |
enable | bool | 是否启用 | |
path | string | 附件路径 | |
name | string | 附件名称 | |
size | int64 | 附件大小,单位:字节 | |
width | int64 | 附件宽度,单位:像素。针对图片附件 | |
height | int64 | 附件高度,单位:像素。针对图片附件 | |
ext | string | 扩展名,如:.docx | |
ip | string | 上传IP地址 | |
username | string | 用户名称 | |
type_name | string | 附件类型名称 | |
description | string | 附件描述、备注 | |
created_at | google.protobuf.Timestamp | 创建时间 | |
updated_at | google.protobuf.Timestamp | 更新时间 |
DeleteAttachmentRequest
删除附件请求
Field | Type | Label | Description |
---|---|---|---|
id | int64 | repeated |
GetAttachmentRequest
获取附件请求
Field | Type | Label | Description |
---|---|---|---|
id | int64 |
ListAttachmentReply
列出附件响应
Field | Type | Label | Description |
---|---|---|---|
total | int64 | ||
attachment | Attachment | repeated |
ListAttachmentRequest
列出附件请求
Field | Type | Label | Description |
---|---|---|---|
page | int64 | 页码 | |
size | int64 | 每页数量 | |
wd | string | 搜索关键字 | |
enable | bool | repeated | 是否启用 |
user_id | int64 | repeated | 用户ID |
type | int64 | repeated | 类型 |
ext | string | 扩展名 |
AttachmentAPI
附件服务。只有管理员才有权限操作
Method Name | Request Type | Response Type | Description |
---|---|---|---|
UpdateAttachment | Attachment | .google.protobuf.Empty | 更新附件 |
DeleteAttachment | DeleteAttachmentRequest | .google.protobuf.Empty | 删除附件。这里只是软删除,不会真正删除附件,默认24小时候会真正清除附件 |
GetAttachment | GetAttachmentRequest | Attachment | 查询附件 |
ListAttachment | ListAttachmentRequest | ListAttachmentReply | 列出附件 |