136 lines
2.4 KiB
Go
136 lines
2.4 KiB
Go
package table
|
|
|
|
import "code.achtarmig.org/pas/ui/field"
|
|
|
|
// CDS View
|
|
type (
|
|
TechnicalName string
|
|
DisplayName string
|
|
Description string
|
|
Version string
|
|
State string
|
|
CreatedAt int
|
|
ModifiedAt int
|
|
)
|
|
|
|
// CDS View Field
|
|
type (
|
|
FieldName string
|
|
DataType string
|
|
FieldLength string
|
|
)
|
|
|
|
func (t TechnicalName) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Technical Name",
|
|
Details: "Technical Name of the CDS View",
|
|
}
|
|
}
|
|
|
|
func (t TechnicalName) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t DisplayName) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Name",
|
|
Details: "Name of the CDS View",
|
|
}
|
|
}
|
|
|
|
func (t DisplayName) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t Description) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Description",
|
|
Details: "Discription",
|
|
}
|
|
}
|
|
|
|
func (t Description) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t Version) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Version",
|
|
Details: "Version of the CDS View",
|
|
Justify: field.JustifyRight,
|
|
}
|
|
}
|
|
|
|
func (t Version) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t State) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Release State",
|
|
Details: "Release State of the CDS View. Non-Released views may not be used",
|
|
}
|
|
}
|
|
|
|
func (t State) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t CreatedAt) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Created At",
|
|
Details: "Timestamp of creation of the dataset",
|
|
Justify: field.JustifyRight,
|
|
}
|
|
}
|
|
|
|
func (t CreatedAt) Int() int {
|
|
return int(t)
|
|
}
|
|
|
|
func (t ModifiedAt) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Modified At",
|
|
Details: "Timestamp of last modification of the dataset",
|
|
Justify: field.JustifyRight,
|
|
}
|
|
}
|
|
|
|
func (t ModifiedAt) Int() int {
|
|
return int(t)
|
|
}
|
|
|
|
func (t FieldName) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Field",
|
|
Details: "Name of the CDS View field",
|
|
}
|
|
}
|
|
|
|
func (t FieldName) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t DataType) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Type",
|
|
Details: "Data type of the CDS View field",
|
|
}
|
|
}
|
|
|
|
func (t DataType) String() string {
|
|
return string(t)
|
|
}
|
|
|
|
func (t FieldLength) Info(language string) field.Info {
|
|
return field.Info{
|
|
Title: "Length",
|
|
Details: "Length of the CDS View field",
|
|
Justify: field.JustifyRight,
|
|
}
|
|
}
|
|
|
|
func (t FieldLength) String() string {
|
|
return string(t)
|
|
}
|