models

package
v0.0.0-...-25903c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Duration_Type_Day = 0
View Source
const Duration_Type_Month = 2
View Source
const Duration_Type_Week = 1
View Source
const Duration_Type_Year = 3
View Source
const For_Register = 1
View Source
const TableName = "fin_p2p_lov"

Variables

This section is empty.

Functions

This section is empty.

Types

type Invest_Contract

type Invest_Contract struct {
	Id              int64
	Platform_id     string
	Name            string
	Master_id       int64
	Description     string
	Amount_min      int
	Amount_max      int
	Duration_min    int
	Duration_max    int
	Duration_type   int
	For_register    int
	Rate            float64
	Early_terminate int
	Risk_rank       int

	Master *Master `orm:"-"` //不对Master对象orm映射,不然会有Master_id重复的错误

	Product_url string
	Disp_order  int
	Create_time time.Time `orm:type(TIMESTAMP)`
	Update_time time.Time `orm:type(TIMESTAMP)`
}

func (*Invest_Contract) TableName

func (this *Invest_Contract) TableName() string

type Invest_ContractDao

type Invest_ContractDao struct {
}

func (*Invest_ContractDao) DeleteAllRong360

func (this *Invest_ContractDao) DeleteAllRong360(startTime time.Time)

执行rong360task时,删除任务执行前的数据

func (*Invest_ContractDao) ListAll

func (this *Invest_ContractDao) ListAll() []Invest_Contract

查询所有产品,目前只显示每个平台rate最高的

func (*Invest_ContractDao) QueryByName

func (this *Invest_ContractDao) QueryByName(name string) int64

func (*Invest_ContractDao) Save

func (this *Invest_ContractDao) Save(i *Invest_Contract)

时间类型的值,如果使用o.Insert o.Update方法,go会自动转成UTC时间保存到数据库

func (*Invest_ContractDao) SaveOrUpdate

func (this *Invest_ContractDao) SaveOrUpdate(i *Invest_Contract)

func (*Invest_ContractDao) Update

func (this *Invest_ContractDao) Update(i *Invest_Contract)

type Lov

type Lov struct {
	Id   int64
	Code int
	Name string
	Type int
}

func (*Lov) TableName

func (this *Lov) TableName() string

type LovDao

type LovDao struct {
}

func (*LovDao) List

func (this *LovDao) List(t int) []Lov

func (*LovDao) Types

func (this *LovDao) Types() []Lov

type Master

type Master struct {
	Id                   int64
	Name                 string
	Official_url         string
	Product_description  string
	Invest_area          string
	Duration_description string
	Platform_est_rate    float32
	Platform_min_amount  float32
	Platform_icon_url    string
	Risk_rank            int64
}

func (*Master) TableName

func (this *Master) TableName() string

type MasterDao

type MasterDao struct {
}

func (*MasterDao) Query

func (this *MasterDao) Query(name string) int64

func (*MasterDao) QueryByName

func (this *MasterDao) QueryByName(name string) int64

func (*MasterDao) Save

func (this *MasterDao) Save(m *Master) (int64, error)

func (*MasterDao) SaveOrUpdate

func (this *MasterDao) SaveOrUpdate(m *Master)

type Topic

type Topic struct {
	Id           int64 //need a primary key field
	Topic_id     int64
	Node_id      int64
	Uid          int64
	Ruid         int64
	Title        string
	Keywords     string
	Content      string
	Addtime      int64
	Updatetime   int64
	Lastreply    int
	Views        int
	Comments     int
	Favorites    int
	Closecomment int
	Is_top       int
	Is_hidden    int
	Ord          int64
}

func (*Topic) TableName

func (this *Topic) TableName() string

type TopicDao

type TopicDao struct {
}

func (*TopicDao) InsertOrUpdate

func (this *TopicDao) InsertOrUpdate(t *Topic) int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL