github.com/s7techlab/cckit@v0.10.5/state/mapping/testdata/testdata.go (about)

     1  package testdata
     2  
     3  import (
     4  	"github.com/s7techlab/cckit/state/mapping/testdata/schema"
     5  	"github.com/s7techlab/cckit/testing"
     6  )
     7  
     8  var (
     9  	Dates = []string{`2021-02-15`, `2021-02-16`, `2021-03-15`}
    10  
    11  	CreateEntityWithComplextId = []*schema.EntityWithComplexId{{
    12  		Id: &schema.EntityComplexId{
    13  			IdPart1: []string{`aaa`, `bb`},
    14  			IdPart2: `ccc`,
    15  			IdPart3: testing.MustTime(`2020-01-28T17:00:00Z`),
    16  		},
    17  	}}
    18  
    19  	CreateEntityWithCompositeId = []*schema.CreateEntityWithCompositeId{{
    20  		IdFirstPart:  "A",
    21  		IdSecondPart: 1,
    22  		IdThirdPart:  testing.MustTime(Dates[0] + `T00:00:00Z`),
    23  		Name:         "Lorem",
    24  		Value:        1,
    25  	}, {
    26  		IdFirstPart:  "B",
    27  		IdSecondPart: 1,
    28  		IdThirdPart:  testing.MustTime(Dates[1] + `T00:00:00Z`),
    29  		Name:         "Ipsum",
    30  		Value:        2,
    31  	}, {
    32  		IdFirstPart:  "B",
    33  		IdSecondPart: 2,
    34  		IdThirdPart:  testing.MustTime(Dates[2] + `T00:00:00Z`),
    35  		Name:         "Dolor",
    36  		Value:        3,
    37  	}}
    38  
    39  	CreateEntityWithIndexes = []*schema.CreateEntityWithIndexes{{
    40  		Id:         `aaa`,
    41  		ExternalId: `aaa_aaa`,
    42  		Value:      1,
    43  	}, {
    44  		Id:                  `bbb`,
    45  		ExternalId:          `bbb_bbb`,
    46  		OptionalExternalIds: []string{`bbb_opt1`, `bbb_opt2`},
    47  		Value:               1,
    48  	}}
    49  )