github.com/inklabsfoundation/inkchain@v0.17.1-0.20181025012015-c3cef8062f19/examples/inkwork/cfg.go (about)

     1  
     2  package main
     3  
     4  const (
     5  	// function
     6  	RegisterWork	string = "registerWork"
     7  	Purchase 		string = "purchase"
     8  	Sell			string = "sell"
     9  	Query			string = "query"
    10  	QueryInkwork 	string = "queryInkwork"
    11  	FreeHistory		string = "user_address ~ workId "	
    12  )
    13  
    14  const (
    15  	Shape 	= iota 	
    16  	Line			
    17  	Shade			
    18  	Angle
    19  	DrawNum
    20  	LineWith	
    21  	Color		
    22  	MaxAttr
    23  )
    24  
    25  // work_level
    26  const (
    27  	Common = iota	
    28  	Rare		
    29  	Brilliant	
    30  	Epic		
    31  	Legend			
    32  )
    33  
    34  // query_type
    35  const (
    36  	QueryStart = iota
    37  	All
    38  	Sale
    39  	Self
    40  	QueryEnd
    41  )
    42  
    43  type WorkDef struct {
    44  	WorkId		string	`json:"work_id"`
    45  	Level 		int 	`json:"level"`
    46  	Birth		string	`json:"birth"`
    47  	Owner		string	`json:"owner"`
    48  	Sale		int		`json:"sale"`	// 0not sale, 1sale
    49  	Price 		int		`json:"price"`
    50  	SaleTime	int64	`json:"sale_time"`
    51  }