16 lines
444 B
Go
16 lines
444 B
Go
package entity
|
|
|
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
type UserRole struct {
|
|
ID primitive.ObjectID `bson:"_id,omitempty"`
|
|
UID string `bson:"uid"` // 對應 User 的 _id
|
|
RoleID string `bson:"role_id"` // 對應 Role 的 _id
|
|
CreateAt int64 `bson:"create_at"`
|
|
UpdateAt int64 `bson:"update_at"`
|
|
}
|
|
|
|
func (c *UserRole) Collection() string {
|
|
return "user_role"
|
|
}
|