feat: generic 包新增 IDR、IDW、IDRW 的泛型通用接口

This commit is contained in:
kercylan98 2023-10-16 18:43:10 +08:00
parent df5f2f886f
commit 5259e07a32
1 changed files with 14 additions and 1 deletions

View File

@ -4,11 +4,24 @@ type IdR[ID comparable] interface {
GetId() ID
}
type IDR[ID comparable] interface {
GetID() ID
}
type IdW[ID comparable] interface {
SetId(id ID)
}
type IdRW[ID comparable] interface {
type IDW[ID comparable] interface {
SetID(id ID)
}
type IdR2W[ID comparable] interface {
IdR[ID]
IdW[ID]
}
type IDR2W[ID comparable] interface {
IDR[ID]
IDW[ID]
}