github.com/kaisawind/go-swagger@v0.19.0/fixtures/goparsing/petstore/models/pet.go (about)

     1  // Copyright 2015 go-swagger maintainers
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //    http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package models
    16  
    17  import "time"
    18  
    19  // A Pet is the main product in the store.
    20  // It is used to describe the animals available in the store.
    21  //
    22  // swagger:model pet
    23  type Pet struct {
    24  	// The id of the pet.
    25  	//
    26  	// required: true
    27  	ID int64 `json:"id"`
    28  
    29  	// The name of the pet.
    30  	//
    31  	// required: true
    32  	// pattern: \w[\w-]+
    33  	// minimum length: 3
    34  	// maximum length: 50
    35  	Name string `json:"name"`
    36  
    37  	// The photo urls for the pet.
    38  	// This only accepts jpeg or png images.
    39  	//
    40  	// items pattern: \.(jpe?g|png)$
    41  	PhotoURLs []string `json:"photoUrls,omitempty"`
    42  
    43  	// The current status of the pet in the store.
    44  	Status string `json:"status,omitempty"`
    45  
    46  	// Extra bits of information attached to this pet.
    47  	//
    48  	Tags []Tag `json:"tags,omitempty"`
    49  
    50  	// The pet's birthday
    51  	//
    52  	// swagger:strfmt date
    53  	Birthday time.Time `json:"birthday"`
    54  }