mirror of
https://github.com/Damillora/Shioriko.git
synced 2024-11-21 20:07:33 +00:00
43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package models
|
|
|
|
type UserCreateModel struct {
|
|
Email string `json:"email" validate:"required,email"`
|
|
Username string `json:"username" validate:"required"`
|
|
Password string `json:"password" validate:"required"`
|
|
}
|
|
|
|
type UserUpdateModel struct {
|
|
Email string `json:"email" validate:"required,email"`
|
|
Username string `json:"username" validate:"required"`
|
|
OldPassword string `json:"oldPassword"`
|
|
NewPassword string `json:"newPassword"`
|
|
}
|
|
|
|
type TagTypeCreateModel struct {
|
|
Name string `json:"name" validate:"required,ascii"`
|
|
}
|
|
|
|
type TagCreateModel struct {
|
|
Name string `json:"name" validate:"required,ascii"`
|
|
TagTypeID uint `json:"tagTypeId" validate:"required"`
|
|
}
|
|
|
|
type TagUpdateModel struct {
|
|
Name string `json:"name" validate:"required,ascii"`
|
|
TagTypeID uint `json:"tagTypeId" validate:"required"`
|
|
}
|
|
|
|
type TagNoteUpdateModel struct {
|
|
Note string `json:"note" validate:"required"`
|
|
}
|
|
type PostCreateModel struct {
|
|
BlobID string `json:"blob_id" validate:"required"`
|
|
SourceURL string `json:"source_url"`
|
|
Tags []string `json:"tags"`
|
|
}
|
|
|
|
type PostUpdateModel struct {
|
|
SourceURL string `json:"source_url"`
|
|
Tags []string `json:"tags"`
|
|
}
|