blob: b7a52e2c8c3e7c2489ffc2ddc24002aab00092a9 [file] [log] [blame]
ToineSiebelinke7311182020-11-10 16:32:50 +00001module stores {
ToineSiebelink79ade5d2020-10-01 14:43:49 +01002 yang-version 1.1;
ToineSiebelink79ade5d2020-10-01 14:43:49 +01003 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 Anupriyaad61e282023-07-17 20:20:34 +053018 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
ToineSiebelink79ade5d2020-10-01 14:43:49 +010046 container bookstore {
47
ToineSiebelinke7311182020-11-10 16:32:50 +000048 leaf bookstore-name {
49 type string;
50 }
51
ToineSiebelink79ade5d2020-10-01 14:43:49 +010052 list categories {
53
ToineSiebelinke7311182020-11-10 16:32:50 +000054 key "code";
55
56 leaf code {
57 type string;
58 }
ToineSiebelink79ade5d2020-10-01 14:43:49 +010059
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}