Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPbDocumentMetadata ¶
func NewPbDocumentMetadata(md *ModelDocument) *apppb.DataMetadata
Types ¶
type DocumentID ¶
type DocumentID struct {
S string
}
func NewDocumentID ¶
func NewDocumentID() DocumentID
func Parse ¶
func Parse(s string) (DocumentID, error)
func (*DocumentID) Scan ¶
func (d *DocumentID) Scan(value interface{}) error
func (DocumentID) String ¶
func (d DocumentID) String() string
type ModelDocument ¶
type ModelDocument struct {
ID DocumentID `gorm:"column:id;primaryKey;type:string;"`
CreatedAt time.Time `gorm:"column:created_at"`
UpdatedAt time.Time `gorm:"column:updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at"`
Data *ModelDocumentData `gorm:"column:data;type:jsonb"`
ModelCollectionID modelcollections.CollectionID `gorm:"column:model_collection_id;primaryKey;"` // foreign key to model collection
ModelCollection modelcollections.ModelCollection
ModelProjectID modelprojects.ProjectID `gorm:"column:model_project_id;primaryKey;"` // foreigh key to model project
ModelProject modelprojects.ModelProject
}
func (ModelDocument) TableName ¶
func (m ModelDocument) TableName() string
type ModelDocumentData ¶
type ModelDocumentData struct {
MapValue map[string]interface{} `json:"json_value"`
}
func NewModelDocumentData ¶
func NewModelDocumentData(v map[string]interface{}) *ModelDocumentData
func (*ModelDocumentData) Scan ¶
func (d *ModelDocumentData) Scan(value interface{}) error
Click to show internal directories.
Click to hide internal directories.