This commit is contained in:
2024-09-03 17:47:24 +08:00
parent 05e2ab8bb8
commit f2014976c9
4 changed files with 27 additions and 4 deletions

18
erp/bean/file.go Normal file
View File

@@ -0,0 +1,18 @@
package bean
import "encoding/json"
type FileData struct {
Name string `json:"name"`
Path string `json:"path"`
}
func (f FileData) ToString() string {
marshal, _ := json.Marshal(f)
return string(marshal)
}
func (f FileData) Parse(data string) FileData {
json.Unmarshal([]byte(data), &f)
return f
}