35 lines
619 B
Go
35 lines
619 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/jinzhu/gorm"
|
|
"github.com/lib/pq"
|
|
)
|
|
|
|
type Contract struct {
|
|
gorm.Model
|
|
Name string
|
|
DeviceIDs pq.Int64Array `gorm:"type:integer[]"`
|
|
BuyerID uint
|
|
StartLat float64
|
|
StartLon float64
|
|
EndLat float64
|
|
EndLon float64
|
|
StartTime time.Time
|
|
EndTime time.Time
|
|
Status string
|
|
BlockchainID string
|
|
ContractInfos []ContractInfo
|
|
}
|
|
|
|
func (Contract) Update() (bool, error) {
|
|
return false, nil
|
|
}
|
|
func (Contract) Create() (bool, error) {
|
|
return false, nil
|
|
}
|
|
func (Contract) Delete() (bool, error) {
|
|
return false, nil
|
|
}
|