mirror of
https://github.com/emo2007/block-accounting.git
synced 2024-11-13 22:06:27 +00:00
28 lines
549 B
Go
28 lines
549 B
Go
|
package models
|
||
|
|
||
|
import (
|
||
|
"encoding/json"
|
||
|
"time"
|
||
|
|
||
|
"github.com/google/uuid"
|
||
|
)
|
||
|
|
||
|
type Organizations []*Organization
|
||
|
|
||
|
func (i *Organizations) MarshalBinary() ([]byte, error) {
|
||
|
return json.Marshal(i)
|
||
|
}
|
||
|
|
||
|
type Organization struct {
|
||
|
ID uuid.UUID `json:"id"`
|
||
|
Name string `json:"name"`
|
||
|
Address string `json:"addess"`
|
||
|
WalletSeed []byte `json:"wallet_seed"`
|
||
|
CreatedAt time.Time `json:"created_at"`
|
||
|
UpdatedAt time.Time `json:"updated_at"`
|
||
|
}
|
||
|
|
||
|
func (i *Organization) MarshalBinary() ([]byte, error) {
|
||
|
return json.Marshal(i)
|
||
|
}
|