mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-30 18:23:35 +08:00
32 lines
825 B
Go
32 lines
825 B
Go
package models
|
|
|
|
import "yunion.io/x/onecloud/pkg/cloudcommon/db"
|
|
|
|
type SGuestJointsManager struct {
|
|
db.SVirtualJointResourceBaseManager
|
|
}
|
|
|
|
func NewGuestJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SGuestJointsManager {
|
|
return SGuestJointsManager{
|
|
SVirtualJointResourceBaseManager: db.NewVirtualJointResourceBaseManager(
|
|
dt,
|
|
tableName,
|
|
keyword,
|
|
keywordPlural,
|
|
GuestManager,
|
|
slave,
|
|
),
|
|
}
|
|
}
|
|
|
|
type SGuestJointsBase struct {
|
|
db.SVirtualJointResourceBase
|
|
|
|
GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
|
|
}
|
|
|
|
func (self *SGuestJointsBase) getGuest() *SGuest {
|
|
guest, _ := GuestManager.FetchById(self.GuestId)
|
|
return guest.(*SGuest)
|
|
}
|