first endpoint: getting product descriptions
This commit is contained in:
20
app/model/productDescription.go
Normal file
20
app/model/productDescription.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
// User represents a user in the system
|
||||
type ProductDescription struct {
|
||||
ProductID uint `gorm:"column:id_product;primaryKey" json:"product_id"`
|
||||
ShopID uint `gorm:"column:id_shop;primaryKey" json:"shop_id"`
|
||||
LangID uint `gorm:"column:id_lang;primaryKey" json:"lang_id"`
|
||||
Description string `gorm:"column:description;type:text" json:"description"`
|
||||
DescriptionShort string `gorm:"column:description_short;type:text" json:"description_short"`
|
||||
LinkRewrite string `gorm:"column:link_rewrite;type:varchar(128)" json:"link_rewrite"`
|
||||
MetaDescription string `gorm:"column:meta_description;type:varchar(512)" json:"meta_description"`
|
||||
MetaKeywords string `gorm:"column:meta_keywords;type:varchar(255)" json:"meta_keywords"`
|
||||
MetaTitle string `gorm:"column:meta_title;type:varchar(128)" json:"meta_title"`
|
||||
Name string `gorm:"column:name;type:varchar(128)" json:"name"`
|
||||
AvailableNow string `gorm:"column:available_now;type:varchar(255)" json:"available_now"`
|
||||
AvailableLater string `gorm:"column:available_later;type:varchar(255)" json:"available_later"`
|
||||
DeliveryInStock string `gorm:"column:delivery_in_stock;type:varchar(255)" json:"delivery_in_stock"`
|
||||
DeliveryOutStock string `gorm:"column:delivery_out_stock;type:varchar(255)" json:"delivery_out_stock"`
|
||||
Usage string `gorm:"column:usage;type:text" json:"usage"`
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.ma-al.com/goc_daniel/b2b/app/utils/pagination"
|
||||
)
|
||||
|
||||
// LoginRequest represents the login form data
|
||||
type DataRequest struct {
|
||||
RepoID uint `json:"repoid" form:"repoid"`
|
||||
Step uint `json:"step" form:"step"`
|
||||
}
|
||||
|
||||
type PageMeta struct {
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
type QuarterData struct {
|
||||
Time float64 `json:"time"`
|
||||
Quarter string `json:"quarter"`
|
||||
}
|
||||
|
||||
type DayData struct {
|
||||
Date string `json:"date"`
|
||||
Time float64 `json:"time"`
|
||||
}
|
||||
|
||||
type RepositoryChartData struct {
|
||||
Years []uint
|
||||
Quarters []QuarterData
|
||||
QuartersJSON string
|
||||
Year uint
|
||||
}
|
||||
|
||||
type TimeTrackedData struct {
|
||||
RepoId uint
|
||||
Year uint
|
||||
Quarter uint
|
||||
Step string
|
||||
TotalTime float64
|
||||
DailyData []DayData
|
||||
DailyDataJSON string
|
||||
Years []uint
|
||||
IssueSummaries *pagination.Found[IssueTimeSummary]
|
||||
}
|
||||
|
||||
type IssueTimeSummary struct {
|
||||
IssueID uint `gorm:"column:issue_id"`
|
||||
IssueName string `gorm:"column:issue_name"`
|
||||
CreatedDate time.Time `gorm:"column:issue_created_at"`
|
||||
TotalHoursSpent float64 `gorm:"column:total_hours_spent"`
|
||||
}
|
||||
Reference in New Issue
Block a user