github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/internal/pkg/model/mock.go (about)

     1  package model
     2  
     3  import (
     4  	consts "github.com/easysoft/zendata/internal/pkg/const"
     5  )
     6  
     7  type ZdMock struct {
     8  	Model
     9  	Name  string `json:"name"`
    10  	Path  string `json:"path"`
    11  	Desc  string `json:"desc"`
    12  	DefId uint   `json:"defId"`
    13  
    14  	SpecContent string `json:"specContent"`
    15  	MockContent string `json:"mockContent"`
    16  	DataContent string `json:"dataContent"`
    17  	DataPath    string `json:"dataPath"`
    18  }
    19  
    20  func (*ZdMock) TableName() string {
    21  	return consts.TablePrefix + "mock"
    22  }
    23  
    24  type ZdMockSampleSrc struct {
    25  	Model
    26  	MockId uint   `json:"mockId"`
    27  	Key    string `json:"key"`
    28  	Value  string `json:"value"`
    29  }
    30  
    31  func (*ZdMockSampleSrc) TableName() string {
    32  	return consts.TablePrefix + "mock_sample_src"
    33  }