diff --git a/characteristics.go b/characteristics.go index efa2608..5a7d7b3 100644 --- a/characteristics.go +++ b/characteristics.go @@ -20,6 +20,7 @@ type CharacteristicBase struct { Id int64 `json:"id,omitempty"` CharacteristicName string `db:"characteristic_name" json:"characteristicName"` CharacteristicTypeId int64 `db:"characteristic_type_id" json:"-"` + Sort NullInt64 `db:"sort" json:"sort"` CreatedAt time.Time `db:"created_at" json:"createdAt"` UpdatedAt time.Time `db:"updated_at" json:"updatedAt"` DeletedAt NullTime `db:"deleted_at" json:"deletedAt"` diff --git a/migrations/00006_AddCharacteristics_up.sql b/migrations/00006_AddCharacteristics_up.sql index 86802cb..1c369e8 100644 --- a/migrations/00006_AddCharacteristics_up.sql +++ b/migrations/00006_AddCharacteristics_up.sql @@ -5,6 +5,7 @@ CREATE TABLE characteristics ( id BIGSERIAL NOT NULL, characteristic_name TEXT NOT NULL, characteristic_type_id BIGINT NOT NULL, + sort BIGINT NULL, created_at TIMESTAMP WITH TIME ZONE NOT NULL, updated_at TIMESTAMP WITH TIME ZONE NOT NULL,