Implementation of a generic backend of eshop in Crystal
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
262 B

  1. require "json"
  2. require "uuid"
  3. require "uuid/json"
  4. require "./product"
  5. class Category
  6. JSON.mapping(
  7. name: {type: String, nilable: true},
  8. name_id: String,
  9. parent: {type: String, nilable: true},
  10. products: Array(UUID)
  11. )
  12. end