Implementation of a generic backend of eshop in Crystal
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

13 rader
383 B

6 år sedan
6 år sedan
6 år sedan
6 år sedan
  1. require "json"
  2. require "uuid"
  3. require "uuid/json"
  4. class Product
  5. JSON.mapping(
  6. price: {type: Float64, nilable: true},
  7. tax_rate: {type: Float64, nilable: true},
  8. name: {type: String, default: "Undefined"},
  9. description: {type: String, default: "No description available"},
  10. pic_url: {type: String, nilable: true},
  11. id: UUID,
  12. )
  13. end