Files
old-backend/models/contract.go

30 lines
547 B
Go
Raw Normal View History

2023-09-18 12:27:40 +02:00
package models
2023-09-18 13:39:32 +02:00
import (
"github.com/jinzhu/gorm"
"github.com/lib/pq"
)
2023-09-18 12:27:40 +02:00
type Contract struct {
gorm.Model
Name string
2023-09-18 13:39:32 +02:00
DeviceIDs pq.Int64Array `gorm:"type:integer[]"`
2023-09-18 12:27:40 +02:00
BuyerID uint
Status string
BlockchainID string
ContractInfos []ContractInfo
}
2023-09-19 08:15:42 +02:00
const ContractStatusActive = "active"
const ContractStatusPending = "pending"
2023-09-18 12:27:40 +02:00
func (Contract) Update() (bool, error) {
return false, nil
}
func (Contract) Create() (bool, error) {
return false, nil
}
func (Contract) Delete() (bool, error) {
return false, nil
}