ToineSiebelink | e731118 | 2020-11-10 16:32:50 +0000 | [diff] [blame] | 1 | module stores { |
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 2 | yang-version 1.1; |
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 3 | namespace "org:onap:ccsdk:sample"; |
| 4 | |
| 5 | prefix book-store; |
| 6 | |
| 7 | revision "2020-09-15" { |
| 8 | description |
| 9 | "Sample Model"; |
| 10 | } |
| 11 | |
| 12 | typedef year { |
| 13 | type uint16 { |
| 14 | range "1000..9999"; |
| 15 | } |
| 16 | } |
| 17 | |
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame^] | 18 | list invoice { |
| 19 | key "ProductID"; |
| 20 | leaf ProductID { |
| 21 | type uint64; |
| 22 | mandatory "true"; |
| 23 | description |
| 24 | "Unique product ID. Example: 001"; |
| 25 | } |
| 26 | leaf ProductName { |
| 27 | type string; |
| 28 | mandatory "true"; |
| 29 | description |
| 30 | "Name of the Product"; |
| 31 | } |
| 32 | leaf price { |
| 33 | type uint64; |
| 34 | mandatory "true"; |
| 35 | description |
| 36 | "Price of book"; |
| 37 | } |
| 38 | leaf stock { |
| 39 | type boolean; |
| 40 | default "false"; |
| 41 | description |
| 42 | "Book in stock or not. Example value: true"; |
| 43 | } |
| 44 | } |
| 45 | |
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 46 | container bookstore { |
| 47 | |
ToineSiebelink | e731118 | 2020-11-10 16:32:50 +0000 | [diff] [blame] | 48 | leaf bookstore-name { |
| 49 | type string; |
| 50 | } |
| 51 | |
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 52 | list categories { |
| 53 | |
ToineSiebelink | e731118 | 2020-11-10 16:32:50 +0000 | [diff] [blame] | 54 | key "code"; |
| 55 | |
| 56 | leaf code { |
| 57 | type string; |
| 58 | } |
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 59 | |
| 60 | leaf name { |
| 61 | type string; |
| 62 | } |
| 63 | |
| 64 | list books { |
| 65 | key title; |
| 66 | |
| 67 | leaf title { |
| 68 | type string; |
| 69 | } |
| 70 | leaf lang { |
| 71 | type string; |
| 72 | } |
| 73 | leaf-list authors { |
| 74 | type string; |
| 75 | } |
| 76 | leaf pub_year { |
| 77 | type year; |
| 78 | } |
| 79 | leaf price { |
| 80 | type uint64; |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | } |