blob: 0d093ea36c36b49066de18489403bed3440ceae6 [file] [log] [blame]
JvD_Ericsson1cbfc282024-02-15 11:34:36 +00001module stores {
2 yang-version 1.1;
3 namespace "org:onap:cps:sample";
4
5 prefix book-store;
6
7 import bookstore-types {
8 prefix "types";
9 revision-date 2024-01-30;
10 }
11
12 revision "2024-02-08" {
13 description
14 "Order of book authors is preserved";
15 }
16
17 revision "2024-01-30" {
18 description
19 "Extracted bookstore types";
20 }
21
22 revision "2020-09-15" {
23 description
24 "Sample Model";
25 }
26
27 list bookstore-address {
28 key "bookstore-name";
29 leaf bookstore-name {
30 type string;
31 description
32 "Name of bookstore. Example: My Bookstore";
33 }
34 leaf address {
35 type string;
36 description
37 "Address of store";
38 }
39 leaf postal-code {
40 type string;
41 description
42 "Postal code of store";
43 }
44 }
45
46 container bookstore {
47
48 leaf bookstore-name {
49 type string;
50 }
51
52 container webinfo {
53 leaf domain-name {
54 type string;
55 }
56 leaf contact-email {
57 type string;
58 }
59 }
60
61 container support-info {
62 leaf support-office {
63 type string;
64 }
65 container contact-emails {
66 leaf email {
67 type string;
68 }
69 }
70 }
71
72 container container-without-leaves { }
73
74 container premises {
75 list addresses {
76 key "house-number street";
77
78 leaf house-number {
79 type uint16;
80 }
81 leaf street {
82 type string;
83 }
84 leaf town {
85 type string;
86 }
87 leaf county {
88 type string;
89 }
90 }
91 }
92
93 list categories {
94
95 key "code";
96
97 leaf code {
98 type string;
99 }
100
101 leaf name {
102 type string;
103 }
104
105 list books {
106 key title;
107
108 leaf title {
109 type string;
110 }
111 leaf lang {
112 type string;
113 }
114 leaf-list authors {
115 ordered-by user;
116 type string;
117 }
118 leaf-list editions {
119 type types:year;
120 }
121 leaf price {
122 type uint64;
123 }
124 }
125 }
126 }
127}