mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-07 16:34:26 +00:00
Add db support for workspaces
This commit is contained in:
16
backend/internal/models/workspace.go
Normal file
16
backend/internal/models/workspace.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Workspace struct {
|
||||
ID int `json:"id" validate:"required,min=1"`
|
||||
UserID int `json:"userId" validate:"required,min=1"`
|
||||
Name string `json:"name" validate:"required"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
func (w *Workspace) Validate() error {
|
||||
return validate.Struct(w)
|
||||
}
|
||||
Reference in New Issue
Block a user