feat: label domain
This commit is contained in:
parent
d051669c6d
commit
71e25bfa9d
27
internal/label/domain.go
Normal file
27
internal/label/domain.go
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
package label
|
||||||
|
|
||||||
|
import "context"
|
||||||
|
|
||||||
|
type Label struct {
|
||||||
|
ID int `json:"id"`
|
||||||
|
Type string `json:"type"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
RelativeId int `json:"relativeId"`
|
||||||
|
Count int `json:"count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type LabelRepository interface {
|
||||||
|
GetLabels(ctx context.Context) (*[]Label, error)
|
||||||
|
GetLabelById(ctx context.Context, id int) (*Label, error)
|
||||||
|
CreateLabel(ctx context.Context, label *Label) error
|
||||||
|
UpdateLabel(ctx context.Context, label *Label) error
|
||||||
|
DeleteLabel(ctx context.Context, id int) error
|
||||||
|
}
|
||||||
|
|
||||||
|
type LabelService interface {
|
||||||
|
GetLabels(ctx context.Context) (*[]Label, error)
|
||||||
|
GetLabelById(ctx context.Context, id int) (*Label, error)
|
||||||
|
CreateLabel(ctx context.Context, label *Label) error
|
||||||
|
UpdateLabel(ctx context.Context, label *Label) error
|
||||||
|
DeleteLabel(ctx context.Context, id int) error
|
||||||
|
}
|
1
internal/label/handle.go
Normal file
1
internal/label/handle.go
Normal file
|
@ -0,0 +1 @@
|
||||||
|
package label
|
1
internal/label/reposiroty.go
Normal file
1
internal/label/reposiroty.go
Normal file
|
@ -0,0 +1 @@
|
||||||
|
package label
|
1
internal/label/service.go
Normal file
1
internal/label/service.go
Normal file
|
@ -0,0 +1 @@
|
||||||
|
package label
|
Loading…
Reference in New Issue
Block a user