Add sort to characteristics
This commit is contained in:
parent
35bf1e363c
commit
0a75837292
2 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,7 @@ type CharacteristicBase struct {
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
CharacteristicName string `db:"characteristic_name" json:"characteristicName"`
|
CharacteristicName string `db:"characteristic_name" json:"characteristicName"`
|
||||||
CharacteristicTypeId int64 `db:"characteristic_type_id" json:"-"`
|
CharacteristicTypeId int64 `db:"characteristic_type_id" json:"-"`
|
||||||
|
Sort NullInt64 `db:"sort" json:"sort"`
|
||||||
CreatedAt time.Time `db:"created_at" json:"createdAt"`
|
CreatedAt time.Time `db:"created_at" json:"createdAt"`
|
||||||
UpdatedAt time.Time `db:"updated_at" json:"updatedAt"`
|
UpdatedAt time.Time `db:"updated_at" json:"updatedAt"`
|
||||||
DeletedAt NullTime `db:"deleted_at" json:"deletedAt"`
|
DeletedAt NullTime `db:"deleted_at" json:"deletedAt"`
|
||||||
|
|
|
@ -5,6 +5,7 @@ CREATE TABLE characteristics (
|
||||||
id BIGSERIAL NOT NULL,
|
id BIGSERIAL NOT NULL,
|
||||||
characteristic_name TEXT NOT NULL,
|
characteristic_name TEXT NOT NULL,
|
||||||
characteristic_type_id BIGINT NOT NULL,
|
characteristic_type_id BIGINT NOT NULL,
|
||||||
|
sort BIGINT NULL,
|
||||||
|
|
||||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||||
updated_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
updated_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||||
|
|
Reference in a new issue