Skip to content

Commit

Permalink
update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
p-shubh committed Jun 26, 2024
1 parent 14fd293 commit f29a109
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion models/avatar.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

type Avatar struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key" json:"id"`
AvatarID int `json:"avatar_id"`
AvatarID string `json:"avatar_id"`
URL string `json:"url"`
UserID string `json:"user_id"`
PhygitalID string `json:"phygital_id"`
Expand Down
4 changes: 2 additions & 2 deletions models/brand.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ type Brand struct {
AdditionalInfo string `json:"additional_info"`
Industry string `json:"industry"`
Tags string `json:"tags"`
Fees int `json:"fees"`
Fees float64 `json:"fees"`
PayoutAddress string `json:"payout_address"`
AccessMaster string `json:"access_master"`
TradeHub string `json:"trade_hub"`
Blockchain string `json:"blockchain"`
ChainID string `json:"chain_id"`
ManagerID int `json:"manager_id"`
ManagerID string `json:"manager_id"` //user walletaddress
CreatedAt time.Time `gorm:"type:timestamp;default:current_timestamp" json:"created_at"`
UpdatedAt time.Time `gorm:"type:timestamp;default:current_timestamp" json:"updated_at"`
}
Expand Down
5 changes: 3 additions & 2 deletions models/phygital.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
type Phygital struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key" json:"id"`
Name string `json:"name"`
BrandName string `json:"brand_name"`
Category string `json:"category"`
Description string `json:"description"`
Price int `json:"price"`
Expand All @@ -29,8 +30,8 @@ type Phygital struct {
DeployerAddress string `json:"deployer_address"`
ContractAddress string `json:"contract_address"`
GraphURL string `json:"graph_url"`
CollectionID int `json:"collection_id"`
CreatedAt time.Time `gorm:"type:timestamp;default:current_timestamp" json:"created_at"`
CollectionID uuid.UUID `json:"collection_id"`
CreatedAt time.Time `gorm:"type:timestamp;default:current_timestamp" json:"created_at"`
UpdatedAt time.Time `gorm:"type:timestamp;default:current_timestamp" json:"updated_at"`
}

Expand Down

0 comments on commit f29a109

Please sign in to comment.