作者 yangfu

添加 出勤记录

version: v1
kind: HttpApi
metadata:
service: attendance
path: /attendances
endpoints:
- method: createAttendance
route:
post: /
- method: updateAttendance
route:
put: /{productAttendanceId}
- method: getAttendance
route:
get: /{productAttendanceId}
- method: removeAttendance
route:
delete: /{productAttendanceId}
- method: listAttendance
route:
get: /
params:
- name: offset
- name: limit
- method: approveAttendance
route:
post: /approve
... ...
version: v1
kind: Method
metadata:
name: approveAttendance
type: command
description: 审核工时
payload:
- ref: productAttendanceId
required: true
- name: workTimeAfter
description: 工时
type:
primitive: float64
result:
- name: attendance
type:
schema: productAttendanceRecord
required: true
... ...
version: v1
kind: Method
metadata:
name: createAttendance
type: command
description: 创建
payload:
- ref: productAttendanceId
required: true
result:
- name: attendance
type:
schema: productAttendanceRecord
required: true
... ...
version: v1
kind: Method
metadata:
name: getAttendance
type: query
description: 返回
payload:
- ref: productAttendanceId
required: true
result:
- name: attendance
type:
schema: productAttendanceRecord
required: true
... ...
version: v1
kind: Method
metadata:
name: listAttendance
type: query
description: 返回列表
payload:
- ref: offset
required: true
- ref: limit
required: true
result:
- ref: count
required: true
- name: attendances
type:
array: productAttendanceRecord
required: true
... ...
version: v1
kind: Method
metadata:
name: removeAttendance
type: command
description: 移除
payload:
- ref: productAttendanceId
required: true
result:
- name: attendance
type:
schema: productAttendanceRecord
required: true
... ...
version: v1
kind: Method
metadata:
name: updateAttendance
type: command
description: 更新
payload:
- ref: productAttendanceId
required: true
result:
- name: attendance
type:
schema: productAttendanceRecord
required: true
... ...
version: v1
kind: Service
metadata:
name: attendance
description:
... ...