mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
@@ -37,6 +37,7 @@ type Memo struct {
|
||||
Content string `json:"content"`
|
||||
Visibility Visibility `json:"visibility"`
|
||||
Pinned bool `json:"pinned"`
|
||||
DisplayTs int64 `json:"displayTs"`
|
||||
|
||||
// Related fields
|
||||
Creator *User `json:"creator"`
|
||||
@@ -59,7 +60,8 @@ type MemoPatch struct {
|
||||
ID int
|
||||
|
||||
// Standard fields
|
||||
CreatedTs *int64 `json:"createdTs"`
|
||||
CreatedTs *int64 `json:"createdTs"`
|
||||
UpdatedTs *int64
|
||||
RowStatus *RowStatus `json:"rowStatus"`
|
||||
|
||||
// Domain specific fields
|
||||
|
@@ -16,7 +16,7 @@ const (
|
||||
UserSettingEditorFontStyleKey UserSettingKey = "editorFontStyle"
|
||||
// UserSettingEditorFontStyleKey is the key type for mobile editor style.
|
||||
UserSettingMobileEditorStyleKey UserSettingKey = "mobileEditorStyle"
|
||||
// UserSettingMemoSortOptionKey is the key type for sort time option.
|
||||
// UserSettingMemoSortOptionKey is the key type for memo sort option.
|
||||
UserSettingMemoSortOptionKey UserSettingKey = "memoSortOption"
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@ var (
|
||||
UserSettingMemoVisibilityValue = []Visibility{Privite, Protected, Public}
|
||||
UserSettingEditorFontStyleValue = []string{"normal", "mono"}
|
||||
UserSettingMobileEditorStyleValue = []string{"normal", "float"}
|
||||
UserSettingSortTimeOptionKeyValue = []string{"created_ts", "updated_ts"}
|
||||
UserSettingMemoSortOptionKeyValue = []string{"created_ts", "updated_ts"}
|
||||
)
|
||||
|
||||
type UserSetting struct {
|
||||
@@ -135,7 +135,7 @@ func (upsert UserSettingUpsert) Validate() error {
|
||||
}
|
||||
|
||||
invalid := true
|
||||
for _, value := range UserSettingSortTimeOptionKeyValue {
|
||||
for _, value := range UserSettingMemoSortOptionKeyValue {
|
||||
if memoSortOption == value {
|
||||
invalid = false
|
||||
break
|
||||
|
Reference in New Issue
Block a user