2020-07-08 07:02:55 +00:00
|
|
|
package intimate
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
)
|
|
|
|
|
2020-07-10 08:13:08 +00:00
|
|
|
// IGetSource 源接口结构
|
|
|
|
type IGetSource interface {
|
|
|
|
GetUid() int64 //
|
|
|
|
GetUrl() string //
|
|
|
|
GetTargetType() string //
|
|
|
|
GetSource() sql.NullString //
|
2020-07-13 10:10:48 +00:00
|
|
|
GetPassGob() sql.NullString //
|
2020-07-10 08:13:08 +00:00
|
|
|
GetExt() interface{} //
|
2020-07-14 11:00:34 +00:00
|
|
|
GetUpdateTime() sql.NullTime //
|
2020-07-10 08:13:08 +00:00
|
|
|
GetOperator() int32 //
|
|
|
|
GetErrorMsg() sql.NullString //
|
|
|
|
}
|
|
|
|
|
|
|
|
type IUpdateSource interface {
|
|
|
|
IGetSource
|
|
|
|
|
|
|
|
GetLastOperator() int32
|
|
|
|
|
2020-07-13 10:10:48 +00:00
|
|
|
SetPassGob(sql.NullString)
|
2020-07-10 08:13:08 +00:00
|
|
|
SetExt(ext interface{}) //
|
2020-07-14 11:00:34 +00:00
|
|
|
SetUpdateTime(ut sql.NullTime) //
|
2020-07-10 08:13:08 +00:00
|
|
|
SetOperator(operator int32) //
|
|
|
|
SetErrorMsg(emsg sql.NullString) //
|
|
|
|
}
|
|
|
|
|
2020-07-08 07:02:55 +00:00
|
|
|
// Source 的结构体
|
|
|
|
type Source struct {
|
2020-07-09 03:38:51 +00:00
|
|
|
Uid int64 //
|
2020-07-08 07:02:55 +00:00
|
|
|
Url string //
|
|
|
|
TargetType string //
|
|
|
|
Source sql.NullString //
|
2020-07-13 10:10:48 +00:00
|
|
|
PassGob sql.NullString //
|
2020-07-08 07:02:55 +00:00
|
|
|
Ext interface{} //
|
2020-07-14 11:00:34 +00:00
|
|
|
UpdateTime sql.NullTime //
|
2020-07-08 07:02:55 +00:00
|
|
|
Operator int32 //
|
|
|
|
ErrorMsg sql.NullString //
|
2020-07-10 04:05:33 +00:00
|
|
|
|
|
|
|
lastOperator int32
|
|
|
|
}
|
|
|
|
|
2020-07-13 10:10:48 +00:00
|
|
|
// GetPassGob Get return PassGob sql.NullString
|
|
|
|
func (so *Source) GetPassGob() sql.NullString {
|
|
|
|
return so.PassGob
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPassGob Set PassGob sql.NullString
|
|
|
|
func (so *Source) SetPassGob(PassGob sql.NullString) {
|
|
|
|
so.PassGob = PassGob
|
|
|
|
}
|
|
|
|
|
2020-07-10 04:05:33 +00:00
|
|
|
// GetLastOperator Get return lastOperator int32
|
|
|
|
func (so *Source) GetLastOperator() int32 {
|
|
|
|
return so.lastOperator
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetLastOperator Set lastOperator int32
|
|
|
|
func (so *Source) SetLastOperator(lastOperator int32) {
|
|
|
|
so.lastOperator = lastOperator
|
2020-07-08 07:02:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// GetErrorMsg Get return ErrorMsg sql.NullString
|
|
|
|
func (so *Source) GetErrorMsg() sql.NullString {
|
|
|
|
return so.ErrorMsg
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetErrorMsg Set ErrorMsg sql.NullString
|
|
|
|
func (so *Source) SetErrorMsg(ErrorMsg sql.NullString) {
|
|
|
|
so.ErrorMsg = ErrorMsg
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetOperator Get return Operator sql.NullInt32
|
|
|
|
func (so *Source) GetOperator() int32 {
|
|
|
|
return so.Operator
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetOperator Set Operator sql.NullInt32
|
|
|
|
func (so *Source) SetOperator(Operator int32) {
|
|
|
|
so.Operator = Operator
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetUpdateTime Get return UpdateTime time.Time
|
2020-07-14 11:00:34 +00:00
|
|
|
func (so *Source) GetUpdateTime() sql.NullTime {
|
2020-07-08 07:02:55 +00:00
|
|
|
return so.UpdateTime
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetUpdateTime Set UpdateTime time.Time
|
2020-07-14 11:00:34 +00:00
|
|
|
func (so *Source) SetUpdateTime(UpdateTime sql.NullTime) {
|
2020-07-08 07:02:55 +00:00
|
|
|
so.UpdateTime = UpdateTime
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetExt Get return Ext interface{}
|
|
|
|
func (so *Source) GetExt() interface{} {
|
|
|
|
return so.Ext
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetExt Set Ext interface{}
|
|
|
|
func (so *Source) SetExt(Ext interface{}) {
|
|
|
|
so.Ext = Ext
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetSource Get return Source sql.NullString
|
|
|
|
func (so *Source) GetSource() sql.NullString {
|
|
|
|
return so.Source
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetSource Set Source sql.NullString
|
|
|
|
func (so *Source) SetSource(Source sql.NullString) {
|
|
|
|
so.Source = Source
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetTargetType Get return TargetType string
|
|
|
|
func (so *Source) GetTargetType() string {
|
|
|
|
return so.TargetType
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetTargetType Set TargetType string
|
|
|
|
func (so *Source) SetTargetType(TargetType string) {
|
|
|
|
so.TargetType = TargetType
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetUrl Get return Url string
|
|
|
|
func (so *Source) GetUrl() string {
|
|
|
|
return so.Url
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetUrl Set Url string
|
|
|
|
func (so *Source) SetUrl(Url string) {
|
|
|
|
so.Url = Url
|
|
|
|
}
|
|
|
|
|
2020-07-09 03:38:51 +00:00
|
|
|
// GetUid Get return Uid int64
|
|
|
|
func (so *Source) GetUid() int64 {
|
2020-07-08 07:02:55 +00:00
|
|
|
return so.Uid
|
|
|
|
}
|
|
|
|
|
2020-07-09 03:38:51 +00:00
|
|
|
// SetUid Set Uid int64
|
|
|
|
func (so *Source) SetUid(Uid int64) {
|
2020-07-08 07:02:55 +00:00
|
|
|
so.Uid = Uid
|
|
|
|
}
|