aim-oscar-server/models/Buddy.go

13 lines
337 B
Go
Raw Normal View History

2021-12-19 01:14:25 -05:00
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"`
}