黄梓健 5 years ago
parent
commit
45c9120ed1
  1. 78
      models/base.go
  2. 85
      models/init_models.go

78
models/base.go

@ -8,6 +8,84 @@ import (
"strings"
)
const TableNamePrefix = "ox_"
func init() {
err := core.GetXormAuto().Sync2(
new(Activity),
new(ActivityModuleService),
new(AreaStore),
new(AuctionHistory),
new(AuctionResultRecord),
new(BaheTeam),
new(BaheTeamMember),
new(BarrageHistory),
new(BullyScreenHistory),
new(BullyScreenServer),
new(BullyScreenWalletHistory),
new(Customer),
new(CustomerGoods),
new(CustomerOperation),
new(CustomerOrder),
new(DanMuServer),
new(Invitation),
new(InvitationLetter),
new(LotteryDrawActivity),
new(LotteryDrawEnvelopeWallet),
new(LotteryDrawRecord),
new(LotteryDrawRule),
new(LotteryDrawRuleLadder),
new(LotteryDrawWalletHistory),
new(ModuleService),
new(ModuleServiceHistory),
new(ModuleStyle),
new(NewAuctionActivity),
new(NewVoteActivity),
new(NewVoteActivityHistory),
new(NewVoteActivityLadder),
new(OrderDrawActivity),
new(OrderDrawRecord),
new(OrderDrawRule),
new(OrderDrawRuleLadder),
new(OrderDrawStyle),
new(RewardHistory),
new(RewardServer),
new(RewardWallet),
new(RewardWalletHistory),
new(Sensitive),
new(ShakeRedEnvelopeActivity),
new(ShakeRedEnvelopeRecord),
new(ShakeRedEnvelopeRule),
new(ShakeRedEnvelopeRuleLadder),
new(SignHistory),
new(SignUp),
new(TugOfWar),
new(UpperWall),
new(User),
new(UserWalletHistory),
new(NewVoteActivity),
new(NewVoteActivityHistory),
new(OrderEntryPerson),
new(Rehearsal),
new(MsgWallServer),
new(ShakeRedEnvelopeUser),
new(OrderGift),
new(UserPrize),
new(Calorie),
new(CalorieUser),
new(UserOrder),
new(UserRedPack),
new(RealSignList),
new(RealSignHistory),
new(LiveViewer),
new(LiveConfig),
new(LiveRedEnvelopeRule),
new(UserTransfer),
new(CustomerOrderSub),
)
fmt.Printf("error=======>%v\n\n", err)
}
func Condition(condition map[string]interface{}) *xorm.Session {
session := core.GetXormAuto().NewSession()
for k, v := range condition {

85
models/init_models.go

@ -1,85 +0,0 @@
package models
import (
"fmt"
"github.com/ouxuanserver/osmanthuswine/src/core"
)
const TableNamePrefix = "ox_"
func init() {
err := core.GetXormAuto().Sync2(
new(Activity),
new(ActivityModuleService),
new(AreaStore),
new(AuctionHistory),
new(AuctionResultRecord),
new(BaheTeam),
new(BaheTeamMember),
new(BarrageHistory),
new(BullyScreenHistory),
new(BullyScreenServer),
new(BullyScreenWalletHistory),
new(Customer),
new(CustomerGoods),
new(CustomerOperation),
new(CustomerOrder),
new(DanMuServer),
new(Invitation),
new(InvitationLetter),
new(LotteryDrawActivity),
new(LotteryDrawEnvelopeWallet),
new(LotteryDrawRecord),
new(LotteryDrawRule),
new(LotteryDrawRuleLadder),
new(LotteryDrawWalletHistory),
new(ModuleService),
new(ModuleServiceHistory),
new(ModuleStyle),
new(NewAuctionActivity),
new(NewVoteActivity),
new(NewVoteActivityHistory),
new(NewVoteActivityLadder),
new(OrderDrawActivity),
new(OrderDrawRecord),
new(OrderDrawRule),
new(OrderDrawRuleLadder),
new(OrderDrawStyle),
new(RewardHistory),
new(RewardServer),
new(RewardWallet),
new(RewardWalletHistory),
new(Sensitive),
new(ShakeRedEnvelopeActivity),
new(ShakeRedEnvelopeRecord),
new(ShakeRedEnvelopeRule),
new(ShakeRedEnvelopeRuleLadder),
new(SignHistory),
new(SignUp),
new(TugOfWar),
new(UpperWall),
new(User),
new(UserWalletHistory),
new(NewVoteActivity),
new(NewVoteActivityHistory),
new(OrderEntryPerson),
new(Rehearsal),
new(MsgWallServer),
new(ShakeRedEnvelopeUser),
new(OrderGift),
new(UserPrize),
new(Calorie),
new(CalorieUser),
new(UserOrder),
new(UserRedPack),
new(RealSignList),
new(RealSignHistory),
new(LiveViewer),
new(LiveConfig),
new(LiveRedEnvelopeRule),
new(UserTransfer),
new(CustomerOrderSub),
)
fmt.Printf("error=======>%v\n\n", err)
}
Loading…
Cancel
Save