package model import ( "time" ) type SearchCondition struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` Name string `json:"name" xorm:"not null default '' VARCHAR(64)"` Memo string `json:"memo" xorm:"VARCHAR(255)"` SearchType int `json:"search_type" xorm:"not null default 1 comment('默认搜索模式;1:默认有券;2:默认全部') TINYINT(1)"` SortType int `json:"sort_type" xorm:"not null default 1 comment('搜索默认排序;1:销量高到低;2:价格低到高;3:佣金比例低到高;4:佣金高到低') TINYINT(1)"` LowestPrice string `json:"lowest_price" xorm:"not null default 0.00 comment('搜索最低价格') DECIMAL(11,2)"` LowestCommissionRate string `json:"lowest_commission_rate" xorm:"not null default 0.0000 comment('搜索最低佣金比例') DECIMAL(11,4)"` CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"` UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"` }