@@ -3,7 +3,8 @@ module code.fnuoos.com/go_rely_warehouse/zyos_model.git | |||||
go 1.19 | go 1.19 | ||||
require ( | require ( | ||||
github.com/gin-gonic/gin v1.9.1 | |||||
github.com/go-sql-driver/mysql v1.8.1 | |||||
github.com/syyongx/php2go v0.9.8 | |||||
go.uber.org/zap v1.13.0 | go.uber.org/zap v1.13.0 | ||||
gopkg.in/natefinch/lumberjack.v2 v2.2.1 | gopkg.in/natefinch/lumberjack.v2 v2.2.1 | ||||
gopkg.in/yaml.v3 v3.0.1 | gopkg.in/yaml.v3 v3.0.1 | ||||
@@ -12,16 +13,19 @@ require ( | |||||
require ( | require ( | ||||
filippo.io/edwards25519 v1.1.0 // indirect | filippo.io/edwards25519 v1.1.0 // indirect | ||||
github.com/go-sql-driver/mysql v1.8.1 // indirect | |||||
github.com/goccy/go-json v0.10.2 // indirect | github.com/goccy/go-json v0.10.2 // indirect | ||||
github.com/golang/snappy v0.0.4 // indirect | github.com/golang/snappy v0.0.4 // indirect | ||||
github.com/json-iterator/go v1.1.12 // indirect | github.com/json-iterator/go v1.1.12 // indirect | ||||
github.com/mattn/go-isatty v0.0.19 // indirect | |||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||||
github.com/modern-go/reflect2 v1.0.2 // indirect | github.com/modern-go/reflect2 v1.0.2 // indirect | ||||
github.com/stretchr/testify v1.8.3 // indirect | |||||
github.com/syndtr/goleveldb v1.0.0 // indirect | github.com/syndtr/goleveldb v1.0.0 // indirect | ||||
go.uber.org/atomic v1.6.0 // indirect | go.uber.org/atomic v1.6.0 // indirect | ||||
go.uber.org/multierr v1.5.0 // indirect | go.uber.org/multierr v1.5.0 // indirect | ||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect | golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect | ||||
golang.org/x/net v0.10.0 // indirect | |||||
golang.org/x/sys v0.8.0 // indirect | |||||
golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 // indirect | golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78 // indirect | ||||
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 // indirect | xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978 // indirect | ||||
) | ) |
@@ -0,0 +1,9 @@ | |||||
package dao | |||||
import ( | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
) | |||||
type HappyOrchardBasicSettingDao interface { | |||||
GetHappyOrchardBasicSetting() (m *models.HappyOrchardBasicSetting, err error) | |||||
} |
@@ -6,4 +6,6 @@ import ( | |||||
type HappyOrchardRewardDao interface { | type HappyOrchardRewardDao interface { | ||||
GetHappyOrchardReward(id int) (m *models.HappyOrchardReward, err error) | GetHappyOrchardReward(id int) (m *models.HappyOrchardReward, err error) | ||||
FindHappyOrchardRewardById(seedId []int) (m *[]models.HappyOrchardReward, err error) | |||||
FindHappyOrchardRewardAll(rewardIds []int, start, limit int) (mm *[]models.HappyOrchardReward, err error) | |||||
} | } |
@@ -0,0 +1,10 @@ | |||||
package dao | |||||
import ( | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
) | |||||
type HappyOrchardSignDayDao interface { | |||||
GetHappyOrchardSignDay(uid int) (m *models.HappyOrchardSignDay, err error) | |||||
GetHappyOrchardSignDaySess(uid int) (m *models.HappyOrchardSignDay, err error) | |||||
} |
@@ -7,4 +7,7 @@ import ( | |||||
type HappyOrchardRewardExchangeRecordsDao interface { | type HappyOrchardRewardExchangeRecordsDao interface { | ||||
GetHappyOrchardRewardExchangeRecords(id int) (m *models.HappyOrchardRewardExchangeRecords, err error) | GetHappyOrchardRewardExchangeRecords(id int) (m *models.HappyOrchardRewardExchangeRecords, err error) | ||||
FindHappyOrchardRewardExchangeRecordsByUid(uid int) (mm *[]models.HappyOrchardRewardExchangeRecords, err error) | FindHappyOrchardRewardExchangeRecordsByUid(uid int) (mm *[]models.HappyOrchardRewardExchangeRecords, err error) | ||||
GetHappyOrchardRewardExchangeRecordsByRecordId(id int) (m *models.HappyOrchardRewardExchangeRecords, err error) | |||||
GetHappyOrchardRewardExchangeRecordsByUidWithState(uid, state int) (m *models.HappyOrchardRewardExchangeRecords, err error) | |||||
GetHappyOrchardRewardExchangeRecordsByUidWithStateAndId(uid, id, state int) (m *models.HappyOrchardRewardExchangeRecords, err error) | |||||
} | } |
@@ -0,0 +1,8 @@ | |||||
package dao | |||||
import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
type HappyOrchardRewardWithSeedDao interface { | |||||
FindHappyOrchardRewardWithSeedBySeedId(seedId []int) (m *[]models.HappyOrchardRewardWithSeed, err error) | |||||
FindHappyOrchardRewardWithSeedBySeedIdAndId(rewardId, seedId int) (m *models.HappyOrchardRewardWithSeed, err error) | |||||
} |
@@ -4,4 +4,5 @@ import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
type HappyOrchardSeedDao interface { | type HappyOrchardSeedDao interface { | ||||
GetHappyOrchardSeed(id int) (m *models.HappyOrchardSeed, err error) | GetHappyOrchardSeed(id int) (m *models.HappyOrchardSeed, err error) | ||||
FindHappyOrchardSeedAll(start, limit int) (mm *[]models.HappyOrchardSeed, err error) | |||||
} | } |
@@ -1,3 +1,4 @@ | |||||
<<<<<<< HEAD | |||||
package dao | package dao | ||||
import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | ||||
@@ -5,4 +6,17 @@ import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
type HappyOrchardUserSeedRecordDao interface { | type HappyOrchardUserSeedRecordDao interface { | ||||
GetHappyOrchardUserSeedRecord(id int) (m *models.HappyOrchardUserSeedRecord, err error) | GetHappyOrchardUserSeedRecord(id int) (m *models.HappyOrchardUserSeedRecord, err error) | ||||
FindHappyOrchardUserSeedRecordsByUid(uid int) (mm *[]models.HappyOrchardUserSeedRecord, err error) | FindHappyOrchardUserSeedRecordsByUid(uid int) (mm *[]models.HappyOrchardUserSeedRecord, err error) | ||||
======= | |||||
package dao | |||||
import ( | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
) | |||||
type HappyOrchardUserSeedRecordDao interface { | |||||
GetHappyOrchardUserSeedRecord(id int) (m *models.HappyOrchardUserSeedRecord, err error) | |||||
FindHappyOrchardUserSeedRecordByUid(uid int) (mm *[]models.HappyOrchardUserSeedRecord, err error) | |||||
GetHappyOrchardUserSeedRecordByUidWithState(uid, state int) (m *models.HappyOrchardUserSeedRecord, err error) | |||||
GetHappyOrchardUserSeedRecordByUidWithStateAndId(uid, id, state int) (m *models.HappyOrchardUserSeedRecord, err error) | |||||
>>>>>>> f2a8ff9c85ab744b6d70d0d47df094f2a870d34a | |||||
} | } |
@@ -6,4 +6,5 @@ import ( | |||||
type HappyOrchardUserWatersDao interface { | type HappyOrchardUserWatersDao interface { | ||||
GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) | GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) | ||||
GetHappyOrchardUserWatersSess(uid int) (m *models.HappyOrchardUserWaters, err error) | |||||
} | } |
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | ||||
@@ -11,9 +11,13 @@ type HappyOrchardBasicSettingDb struct { | |||||
Db *xorm.Engine | Db *xorm.Engine | ||||
} | } | ||||
func NewHappyOrchardBasicSettingDb(engine *xorm.Engine) dao.HappyOrchardBasicSettingDao { | |||||
return &HappyOrchardBasicSettingDb{Db: engine} | |||||
} | |||||
func (h HappyOrchardBasicSettingDb) GetHappyOrchardBasicSetting() (m *models.HappyOrchardBasicSetting, err error) { | func (h HappyOrchardBasicSettingDb) GetHappyOrchardBasicSetting() (m *models.HappyOrchardBasicSetting, err error) { | ||||
m = new(models.HappyOrchardBasicSetting) | m = new(models.HappyOrchardBasicSetting) | ||||
has, err := h.Db.Where("id > 0").Get(m) | |||||
has, err := h.Db.Get(m) | |||||
if err != nil { | if err != nil { | ||||
return nil, zhios_order_relate_logx.Error(err) | return nil, zhios_order_relate_logx.Error(err) | ||||
} | } | ||||
@@ -22,7 +26,3 @@ func (h HappyOrchardBasicSettingDb) GetHappyOrchardBasicSetting() (m *models.Hap | |||||
} | } | ||||
return m, nil | return m, nil | ||||
} | } | ||||
func NewHappyOrchardBasicSettingDb(engine *xorm.Engine) dao.HappyOrchardBasicSettingDao { | |||||
return &HappyOrchardBasicSettingDb{Db: engine} | |||||
} |
@@ -26,3 +26,17 @@ func (h HappyOrchardRewardDb) GetHappyOrchardReward(id int) (m *models.HappyOrch | |||||
} | } | ||||
return m, nil | return m, nil | ||||
} | } | ||||
func (h HappyOrchardRewardDb) FindHappyOrchardRewardById(id []int) (mm *[]models.HappyOrchardReward, err error) { | |||||
var m []models.HappyOrchardReward | |||||
if err := h.Db.In("id", id).Find(&m); err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
return &m, nil | |||||
} | |||||
func (h HappyOrchardRewardDb) FindHappyOrchardRewardAll(rewardIds []int, start, limit int) (mm *[]models.HappyOrchardReward, err error) { | |||||
var m []models.HappyOrchardReward | |||||
if err := h.Db.Where("nums>0").In("id", rewardIds).OrderBy("sort desc,id desc").Limit(limit, start).Find(&m); err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
return &m, nil | |||||
} |
@@ -36,3 +36,36 @@ func (h HappyOrchardRewardExchangeRecordsDb) FindHappyOrchardRewardExchangeRecor | |||||
} | } | ||||
return &m, nil | return &m, nil | ||||
} | } | ||||
func (h HappyOrchardRewardExchangeRecordsDb) GetHappyOrchardRewardExchangeRecordsByUidWithState(uid, state int) (m *models.HappyOrchardRewardExchangeRecords, err error) { | |||||
m = new(models.HappyOrchardRewardExchangeRecords) | |||||
has, err := h.Db.Where("uid =? and state=?", uid, state).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} | |||||
func (h HappyOrchardRewardExchangeRecordsDb) GetHappyOrchardRewardExchangeRecordsByUidWithStateAndId(uid, id, state int) (m *models.HappyOrchardRewardExchangeRecords, err error) { | |||||
m = new(models.HappyOrchardRewardExchangeRecords) | |||||
has, err := h.Db.Where("uid =? and state=? and id=?", uid, state, id).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} | |||||
func (h HappyOrchardRewardExchangeRecordsDb) GetHappyOrchardRewardExchangeRecordsByRecordId(id int) (m *models.HappyOrchardRewardExchangeRecords, err error) { | |||||
m = new(models.HappyOrchardRewardExchangeRecords) | |||||
has, err := h.Db.Where("record_id=?", id).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} |
@@ -0,0 +1,35 @@ | |||||
package implement | |||||
import ( | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" | |||||
"xorm.io/xorm" | |||||
) | |||||
type happyOrchardRewardWithSeedDb struct { | |||||
Db *xorm.Engine | |||||
} | |||||
func NewHappyOrchardRewardWithSeedDb(engine *xorm.Engine) dao.HappyOrchardRewardWithSeedDao { | |||||
return &happyOrchardRewardWithSeedDb{Db: engine} | |||||
} | |||||
func (h happyOrchardRewardWithSeedDb) FindHappyOrchardRewardWithSeedBySeedId(seedId []int) (mm *[]models.HappyOrchardRewardWithSeed, err error) { | |||||
var m []models.HappyOrchardRewardWithSeed | |||||
if err := h.Db.In("seed_id", seedId).Find(&m); err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
return &m, nil | |||||
} | |||||
func (h happyOrchardRewardWithSeedDb) FindHappyOrchardRewardWithSeedBySeedIdAndId(rewardId, seedId int) (m *models.HappyOrchardRewardWithSeed, err error) { | |||||
m = new(models.HappyOrchardRewardWithSeed) | |||||
has, err := h.Db.Where("reward_id=? and seed_id=?", rewardId, seedId).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} |
@@ -26,3 +26,10 @@ func (h HappyOrchardSeedDb) GetHappyOrchardSeed(id int) (m *models.HappyOrchardS | |||||
} | } | ||||
return m, nil | return m, nil | ||||
} | } | ||||
func (h HappyOrchardSeedDb) FindHappyOrchardSeedAll(start, limit int) (mm *[]models.HappyOrchardSeed, err error) { | |||||
var m []models.HappyOrchardSeed | |||||
if err := h.Db.OrderBy("sort desc,id desc").Limit(limit, start).Find(&m); err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
return &m, nil | |||||
} |
@@ -0,0 +1,43 @@ | |||||
package implement | |||||
import ( | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" | |||||
"xorm.io/xorm" | |||||
) | |||||
type happyOrchardSignDayDb struct { | |||||
Db *xorm.Engine | |||||
Sess *xorm.Session | |||||
} | |||||
func NewHappyOrchardSignDayDb(engine *xorm.Engine) dao.HappyOrchardSignDayDao { | |||||
return &happyOrchardSignDayDb{Db: engine} | |||||
} | |||||
func NewHappyOrchardSignDaySess(sess *xorm.Session) dao.HappyOrchardSignDayDao { | |||||
return &happyOrchardSignDayDb{Sess: sess} | |||||
} | |||||
func (h happyOrchardSignDayDb) GetHappyOrchardSignDaySess(uid int) (m *models.HappyOrchardSignDay, err error) { | |||||
m = new(models.HappyOrchardSignDay) | |||||
has, err := h.Sess.Where("uid =?", uid).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} | |||||
func (h happyOrchardSignDayDb) GetHappyOrchardSignDay(uid int) (m *models.HappyOrchardSignDay, err error) { | |||||
m = new(models.HappyOrchardSignDay) | |||||
has, err := h.Db.Where("uid =?", uid).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} |
@@ -0,0 +1,60 @@ | |||||
package implement | |||||
import ( | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | |||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" | |||||
"xorm.io/xorm" | |||||
) | |||||
type happyOrchardUserSeedRecordDb struct { | |||||
Db *xorm.Engine | |||||
} | |||||
func NewHappyOrchardUserSeedRecordDb(engine *xorm.Engine) dao.HappyOrchardUserSeedRecordDao { | |||||
return &happyOrchardUserSeedRecordDb{Db: engine} | |||||
} | |||||
func (h happyOrchardUserSeedRecordDb) GetHappyOrchardUserSeedRecord(id int) (m *models.HappyOrchardUserSeedRecord, err error) { | |||||
//TODO implement me | |||||
m = new(models.HappyOrchardUserSeedRecord) | |||||
has, err := h.Db.Where("id =?", id).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} | |||||
func (h happyOrchardUserSeedRecordDb) FindHappyOrchardUserSeedRecordByUid(uid int) (mm *[]models.HappyOrchardUserSeedRecord, err error) { | |||||
//TODO implement me | |||||
var m []models.HappyOrchardUserSeedRecord | |||||
if err := h.Db.Where("uid =?", uid).Desc("id").Find(&m); err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
return &m, nil | |||||
} | |||||
func (h happyOrchardUserSeedRecordDb) GetHappyOrchardUserSeedRecordByUidWithState(uid, state int) (m *models.HappyOrchardUserSeedRecord, err error) { | |||||
m = new(models.HappyOrchardUserSeedRecord) | |||||
has, err := h.Db.Where("uid =? and state=?", uid, state).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} | |||||
func (h happyOrchardUserSeedRecordDb) GetHappyOrchardUserSeedRecordByUidWithStateAndId(uid, id, state int) (m *models.HappyOrchardUserSeedRecord, err error) { | |||||
m = new(models.HappyOrchardUserSeedRecord) | |||||
has, err := h.Db.Where("uid =? and state=? and id=?", uid, state, id).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} |
@@ -8,13 +8,18 @@ import ( | |||||
) | ) | ||||
type happyOrchardUserWatersDb struct { | type happyOrchardUserWatersDb struct { | ||||
Db *xorm.Engine | |||||
Db *xorm.Engine | |||||
Sess *xorm.Session | |||||
} | } | ||||
func NewHappyOrchardUserWatersDb(engine *xorm.Engine) dao.HappyOrchardUserWatersDao { | func NewHappyOrchardUserWatersDb(engine *xorm.Engine) dao.HappyOrchardUserWatersDao { | ||||
return &happyOrchardUserWatersDb{Db: engine} | return &happyOrchardUserWatersDb{Db: engine} | ||||
} | } | ||||
func NewHappyOrchardUserWatersSess(sess *xorm.Session) dao.HappyOrchardUserWatersDao { | |||||
return &happyOrchardUserWatersDb{Sess: sess} | |||||
} | |||||
func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) { | func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models.HappyOrchardUserWaters, err error) { | ||||
m = new(models.HappyOrchardUserWaters) | m = new(models.HappyOrchardUserWaters) | ||||
has, err := h.Db.Where("uid =?", uid).Get(m) | has, err := h.Db.Where("uid =?", uid).Get(m) | ||||
@@ -26,3 +31,14 @@ func (h happyOrchardUserWatersDb) GetHappyOrchardUserWaters(uid int) (m *models. | |||||
} | } | ||||
return m, nil | return m, nil | ||||
} | } | ||||
func (h happyOrchardUserWatersDb) GetHappyOrchardUserWatersSess(uid int) (m *models.HappyOrchardUserWaters, err error) { | |||||
m = new(models.HappyOrchardUserWaters) | |||||
has, err := h.Sess.Where("uid =?", uid).Get(m) | |||||
if err != nil { | |||||
return nil, zhios_order_relate_logx.Error(err) | |||||
} | |||||
if has == false { | |||||
return nil, nil | |||||
} | |||||
return m, nil | |||||
} |
@@ -10,6 +10,7 @@ type HappyOrchardBasicSetting struct { | |||||
AdRotationData int `json:"ad_rotation_data" xorm:"not null default 1 comment('广告轮播数据(1:仅读取真实数据 2:仅读取虚拟数据 3:两者都读取)') TINYINT(1)"` | AdRotationData int `json:"ad_rotation_data" xorm:"not null default 1 comment('广告轮播数据(1:仅读取真实数据 2:仅读取虚拟数据 3:两者都读取)') TINYINT(1)"` | ||||
IsOpenSevenDaysSign int `json:"is_open_seven_days_sign" xorm:"not null default 1 comment('是否开启7日签到(1:开启 0:关闭)') TINYINT(1)"` | IsOpenSevenDaysSign int `json:"is_open_seven_days_sign" xorm:"not null default 1 comment('是否开启7日签到(1:开启 0:关闭)') TINYINT(1)"` | ||||
SevenDaysSignRewardData string `json:"seven_days_sign_reward_data" xorm:"not null comment('7日签到奖励数据') TEXT"` | SevenDaysSignRewardData string `json:"seven_days_sign_reward_data" xorm:"not null comment('7日签到奖励数据') TEXT"` | ||||
VideoSevenDaysSignRewardData string `json:"video_seven_days_sign_reward_data" xorm:"not null comment('观看视频后的7日签到奖励数据') TEXT"` | |||||
IsOpenTimerSign int `json:"is_open_timer_sign" xorm:"not null default 1 comment('是否开启定时签到(1:开启 0:关闭)') TINYINT(1)"` | IsOpenTimerSign int `json:"is_open_timer_sign" xorm:"not null default 1 comment('是否开启定时签到(1:开启 0:关闭)') TINYINT(1)"` | ||||
TimerSignRewardData string `json:"timer_sign_reward_data" xorm:"not null comment('定时签到奖励数据') TEXT"` | TimerSignRewardData string `json:"timer_sign_reward_data" xorm:"not null comment('定时签到奖励数据') TEXT"` | ||||
IsOpenPlaceOrderReward int `json:"is_open_place_order_reward" xorm:"not null default 1 comment('是否下单获得奖励(1:开启 0:关闭)') TINYINT(1)"` | IsOpenPlaceOrderReward int `json:"is_open_place_order_reward" xorm:"not null default 1 comment('是否下单获得奖励(1:开启 0:关闭)') TINYINT(1)"` | ||||
@@ -10,6 +10,7 @@ type HappyOrchardRewardExchangeRecords struct { | |||||
SeedName string `json:"seed_name" xorm:"not null default '' comment('种子名称') VARCHAR(255)"` | SeedName string `json:"seed_name" xorm:"not null default '' comment('种子名称') VARCHAR(255)"` | ||||
WaterNums int `json:"water_nums" xorm:"not null default 0 comment('所需水滴数') INT(11)"` | WaterNums int `json:"water_nums" xorm:"not null default 0 comment('所需水滴数') INT(11)"` | ||||
State int `json:"state" xorm:"not null default 0 comment('兑换状态(1:未发放 2:已发放)') TINYINT(1)"` | State int `json:"state" xorm:"not null default 0 comment('兑换状态(1:未发放 2:已发放)') TINYINT(1)"` | ||||
RecordId int `json:"record_id" xorm:"default 0 INT(11)"` | |||||
LogisticCompany string `json:"logistic_company" xorm:"not null default '' comment('物流公司') VARCHAR(255)"` | LogisticCompany string `json:"logistic_company" xorm:"not null default '' comment('物流公司') VARCHAR(255)"` | ||||
LogisticCompanyCode string `json:"logistic_company_code" xorm:"not null default '' comment('物流公司代号') CHAR(50)"` | LogisticCompanyCode string `json:"logistic_company_code" xorm:"not null default '' comment('物流公司代号') CHAR(50)"` | ||||
LogisticNum string `json:"logistic_num" xorm:"default '' comment('物流单号') VARCHAR(255)"` | LogisticNum string `json:"logistic_num" xorm:"default '' comment('物流单号') VARCHAR(255)"` | ||||
@@ -0,0 +1,10 @@ | |||||
package models | |||||
type HappyOrchardSignDay struct { | |||||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||||
Uid int `json:"uid" xorm:"default 0 INT(11)"` | |||||
ContinuityDay int `json:"continuity_day" xorm:"default 0 comment('连续签到天数') INT(11)"` | |||||
LastContinuityDay int `json:"last_continuity_day" xorm:"comment('上一次连续签到天数') INT(11)"` | |||||
SignTime int `json:"sign_time" xorm:"default 0 comment('20240409') INT(11)"` | |||||
LastSignTime int `json:"last_sign_time" xorm:"default 0 comment('20240409') INT(11)"` | |||||
} |
@@ -0,0 +1,15 @@ | |||||
package models | |||||
import ( | |||||
"time" | |||||
) | |||||
type HappyOrchardUserSeedRecord struct { | |||||
Id int `json:"id" xorm:"not null pk autoincr INT(11)"` | |||||
Uid int `json:"uid" xorm:"INT(11)"` | |||||
SeedId int `json:"seed_id" xorm:"not null default 0 INT(11)"` | |||||
WaterNums int `json:"water_nums" xorm:"not null default 0 comment('当前获得水滴数') INT(11)"` | |||||
State int `json:"state" xorm:"not null default 1 comment('状态(1:种植中 2:待领取 3:已领取)') INT(11)"` | |||||
CreateAt time.Time `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') DATETIME"` | |||||
UpdateAt time.Time `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') DATETIME"` | |||||
} |