feat: domain finished
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package entity
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
type ID = uuid.UUID
|
||||
|
||||
func NewID() ID {
|
||||
return ID(uuid.New())
|
||||
}
|
||||
|
||||
func StringToID(s string) (ID, error) {
|
||||
id, err := uuid.Parse(s)
|
||||
return ID(id), err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user