aim-oscar-server/models/Buddy.go
2021-12-19 01:14:25 -05:00

12 lines
337 B
Go

package models
import "github.com/uptrace/bun"
type Buddy struct {
bun.BaseModel `bun:"table:buddies"`
ID int `bun:",pk"`
SourceUIN int64 `bun:",notnull"`
Source *User `bun:"rel:has-one,join:source_uin=uin"`
WithUIN int64 `bun:",notnull"`
Target *User `bun:"rel:has-one,join:with_uin=uin"`
}