refactor: add api v1 package

This commit is contained in:
Steven
2023-06-19 00:54:09 +08:00
parent a9f33cef6a
commit 96bcbbba68
9 changed files with 272 additions and 42 deletions

21
api/v1/common.go Normal file
View File

@ -0,0 +1,21 @@
package v1
// RowStatus is the status for a row.
type RowStatus string
const (
// Normal is the status for a normal row.
Normal RowStatus = "NORMAL"
// Archived is the status for an archived row.
Archived RowStatus = "ARCHIVED"
)
func (e RowStatus) String() string {
switch e {
case Normal:
return "NORMAL"
case Archived:
return "ARCHIVED"
}
return ""
}