Procházet zdrojové kódy

update

tags/v0.0.2
dengbiao před 1 měsícem
rodič
revize
3cbe7dd481
9 změnil soubory, kde provedl 83 přidání a 29 odebrání
  1. +5
    -0
      src/dao/egg_energy_fund_data_dao.go
  2. +5
    -0
      src/dao/egg_energy_fund_data_records_dao.go
  3. +14
    -0
      src/implement/egg_energy_fund_data_implement.go
  4. +14
    -0
      src/implement/egg_energy_fund_data_records_implement.go
  5. +13
    -0
      src/model/egg_energy_fund_data.go
  6. +15
    -0
      src/model/egg_energy_fund_data_records.go
  7. +6
    -10
      src/model/egg_energy_user_watch_records.go
  8. +5
    -9
      src/model/user_relate.go
  9. +6
    -10
      src/model/virtual_coin.go

+ 5
- 0
src/dao/egg_energy_fund_data_dao.go Zobrazit soubor

@@ -0,0 +1,5 @@
package dao

type EggEnergyFundDataDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 0
src/dao/egg_energy_fund_data_records_dao.go Zobrazit soubor

@@ -0,0 +1,5 @@
package dao

type EggEnergyFundDataRecordsDao interface {
//TODO:: You can add specific method definitions here
}

+ 14
- 0
src/implement/egg_energy_fund_data_implement.go Zobrazit soubor

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"xorm.io/xorm"
)

func NewEggEnergyFundDataDb(engine *xorm.Engine) dao.EggEnergyFundDataDao {
return &EggEnergyFundDataDb{Db: engine}
}

type EggEnergyFundDataDb struct {
Db *xorm.Engine
}

+ 14
- 0
src/implement/egg_energy_fund_data_records_implement.go Zobrazit soubor

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"xorm.io/xorm"
)

func NewEggEnergyFundDataRecordsDb(engine *xorm.Engine) dao.EggEnergyFundDataRecordsDao {
return &EggEnergyFundDataRecordsDb{Db: engine}
}

type EggEnergyFundDataRecordsDb struct {
Db *xorm.Engine
}

+ 13
- 0
src/model/egg_energy_fund_data.go Zobrazit soubor

@@ -0,0 +1,13 @@
package model

type EggEnergyFundData struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Kind int `json:"kind" xorm:"not null default 1 comment('种类(1:公司补贴 2:资方投资 3:市场期望)') TINYINT(1)"`
TotalAmount string `json:"total_amount" xorm:"not null comment('金额') DECIMAL(28,10)"`
BalanceAmount string `json:"balance_amount" xorm:"not null comment('余额') DECIMAL(28,10)"`
Hours int `json:"hours" xorm:"not null default 1 comment('时长(小时)') TINYINT(3)"`
BalanceTimes int `json:"balance_times" xorm:"not null default 1 comment('剩余执行次数') TINYINT(3)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注') VARCHAR(255)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 15
- 0
src/model/egg_energy_fund_data_records.go Zobrazit soubor

@@ -0,0 +1,15 @@
package model

type EggEnergyFundDataRecords struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
RecordsId int `json:"records_id" xorm:"not null default 0 comment('记录id') INT(11)"`
TotalAmount string `json:"total_amount" xorm:"not null comment('金额') DECIMAL(28,10)"`
BalanceAmount string `json:"balance_amount" xorm:"not null comment('余额') DECIMAL(28,10)"`
BalanceTimes int `json:"balance_times" xorm:"not null default 1 comment('剩余执行次数') TINYINT(3)"`
BeforePrice string `json:"before_price" xorm:"not null comment('执行前-价格') DECIMAL(28,10)"`
AfterPrice string `json:"after_price" xorm:"not null comment('执行后-价格') DECIMAL(28,10)"`
BeforePlanetTotalValue string `json:"before_planet_total_value" xorm:"not null comment('执行前-星球价值') DECIMAL(28,10)"`
AfterPlanetTotalValue string `json:"after_planet_total_value" xorm:"not null comment('执行后-星球价值') DECIMAL(28,10)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 6
- 10
src/model/egg_energy_user_watch_records.go Zobrazit soubor

@@ -1,14 +1,10 @@
package model

import (
"time"
)

type EggEnergyUserWatchRecords struct {
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
Uid int64 `json:"uid" xorm:"not null default 0 comment('用户id') index BIGINT(20)"`
NextWatchAdDate time.Time `json:"next_watch_ad_date" xorm:"not null default 'CURRENT_TIMESTAMP' comment('下一轮观看视屏时间') DATETIME"`
ResidueWatchAdNum int `json:"residue_watch_ad_num" xorm:"not null default 0 comment('剩余观看视屏数') INT(11)"`
CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
Uid int64 `json:"uid" xorm:"not null default 0 comment('用户id') index BIGINT(20)"`
NextWatchAdDate string `json:"next_watch_ad_date" xorm:"not null default 'CURRENT_TIMESTAMP' comment('下一轮观看视屏时间') DATETIME"`
ResidueWatchAdNum int `json:"residue_watch_ad_num" xorm:"not null default 0 comment('剩余观看视屏数') INT(11)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 5
- 9
src/model/user_relate.go Zobrazit soubor

@@ -1,13 +1,9 @@
package model

import (
"time"
)

type UserRelate struct {
Id int64 `json:"id" xorm:"pk autoincr comment('主键') BIGINT(10)"`
ParentUid int64 `json:"parent_uid" xorm:"not null default 0 comment('上级会员ID') unique(idx_union_u_p_id) INT(20)"`
Uid int64 `json:"uid" xorm:"not null default 0 comment('关联UserID') unique(idx_union_u_p_id) INT(20)"`
Level int `json:"level" xorm:"not null default 1 comment('推广等级(1直属,大于1非直属)') INT(10)"`
InviteTime time.Time `json:"invite_time" xorm:"default 'CURRENT_TIMESTAMP' comment('邀请时间') TIMESTAMP"`
Id int64 `json:"id" xorm:"pk autoincr comment('主键') BIGINT(10)"`
ParentUid int64 `json:"parent_uid" xorm:"not null default 0 comment('上级会员ID') unique(idx_union_u_p_id) INT(20)"`
Uid int64 `json:"uid" xorm:"not null default 0 comment('关联UserID') unique(idx_union_u_p_id) INT(20)"`
Level int `json:"level" xorm:"not null default 1 comment('推广等级(1直属,大于1非直属)') INT(10)"`
InviteTime string `json:"invite_time" xorm:"default 'CURRENT_TIMESTAMP' comment('邀请时间') TIMESTAMP"`
}

+ 6
- 10
src/model/virtual_coin.go Zobrazit soubor

@@ -1,14 +1,10 @@
package model

import (
"time"
)

type VirtualCoin struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Name string `json:"name" xorm:"not null default '' comment('名称') VARCHAR(255)"`
ExchangeRatio string `json:"exchange_ratio" xorm:"not null comment('兑换比例(与金额)') DECIMAL(10,2)"`
IsUse int `json:"is_use" xorm:"not null default 0 comment('是否开启:0否 1是') TINYINT(1)"`
CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Name string `json:"name" xorm:"not null default '' comment('名称') VARCHAR(255)"`
ExchangeRatio string `json:"exchange_ratio" xorm:"not null comment('兑换比例(与金额)') DECIMAL(10,2)"`
IsUse int `json:"is_use" xorm:"not null default 0 comment('是否开启:0否 1是') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

Načítá se…
Zrušit
Uložit