github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/istructsmem/internal/descr/interface_structure.go (about)

     1  /*
     2   * Copyright (c) 2021-present Sigma-Soft, Ltd.
     3   * @author: Nikolay Nikitin
     4   */
     5  
     6  package descr
     7  
     8  import (
     9  	"github.com/voedger/voedger/pkg/appdef"
    10  )
    11  
    12  type Structure struct {
    13  	Type
    14  	Kind        string
    15  	Fields      []*Field           `json:",omitempty"`
    16  	Containers  []*Container       `json:",omitempty"`
    17  	Uniques     map[string]*Unique `json:",omitempty"`
    18  	UniqueField appdef.FieldName   `json:",omitempty"`
    19  	Singleton   bool               `json:",omitempty"`
    20  }
    21  
    22  type Field struct {
    23  	Comment    string `json:",omitempty"`
    24  	Name       appdef.FieldName
    25  	DataType   *Data         `json:",omitempty"`
    26  	Data       *appdef.QName `json:",omitempty"`
    27  	Required   bool          `json:",omitempty"`
    28  	Verifiable bool          `json:",omitempty"`
    29  	Refs       []string      `json:",omitempty"`
    30  }
    31  
    32  type Container struct {
    33  	Comment   string `json:",omitempty"`
    34  	Name      string
    35  	Type      appdef.QName
    36  	MinOccurs appdef.Occurs
    37  	MaxOccurs appdef.Occurs
    38  }
    39  
    40  type Unique struct {
    41  	Comment string       `json:",omitempty"`
    42  	Name    appdef.QName `json:"-"`
    43  	Fields  []appdef.FieldName
    44  }