48 lines
1.0 KiB
Go
48 lines
1.0 KiB
Go
package guild
|
|
|
|
import (
|
|
"q5"
|
|
"f5"
|
|
)
|
|
|
|
type guild struct {
|
|
guildId string
|
|
guildName string
|
|
ownerId string
|
|
creatorId string
|
|
badge int32
|
|
notice string
|
|
joinCondType int32
|
|
joinCondVal int32
|
|
maxMemberNum int32
|
|
createTime int32
|
|
modifyTime int32
|
|
}
|
|
|
|
func (this *guild) GetGuildId() string {
|
|
return this.guildId
|
|
}
|
|
|
|
func (this *guild) GetGuildName() string {
|
|
return this.guildName
|
|
}
|
|
|
|
func (this *guild) loadFromDb(ds *f5.DataSet) {
|
|
this.guildId = ds.GetByName("guild_id")
|
|
this.guildName = ds.GetByName("guild_name")
|
|
this.ownerId = ds.GetByName("owner_id")
|
|
this.creatorId = ds.GetByName("creator_id")
|
|
this.badge = q5.ToInt32(ds.GetByName("badge"))
|
|
this.notice = ds.GetByName("notice")
|
|
this.joinCondType = q5.ToInt32(ds.GetByName("join_cond_type"))
|
|
this.joinCondVal = q5.ToInt32(ds.GetByName("join_cond_val"))
|
|
this.maxMemberNum = q5.ToInt32(ds.GetByName("max_members"))
|
|
this.createTime = q5.ToInt32(ds.GetByName("createtime"))
|
|
this.modifyTime = q5.ToInt32(ds.GetByName("modifytime"))
|
|
}
|
|
|
|
func newGuild() *guild {
|
|
p := new(guild)
|
|
return p
|
|
}
|