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 | |||||
Arpit Singh | 61f5e14 | 2023-07-27 14:48:30 +0530 | [diff] [blame] | 18 | list bookstore-address { |
19 | key "bookstore-name"; | ||||
20 | leaf bookstore-name { | ||||
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 21 | type string; |
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 22 | description |
Arpit Singh | 61f5e14 | 2023-07-27 14:48:30 +0530 | [diff] [blame] | 23 | "Name of bookstore. Example: My Bookstore"; |
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 24 | } |
Arpit Singh | 61f5e14 | 2023-07-27 14:48:30 +0530 | [diff] [blame] | 25 | leaf address { |
26 | type string; | ||||
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 27 | description |
Arpit Singh | 61f5e14 | 2023-07-27 14:48:30 +0530 | [diff] [blame] | 28 | "Address of store"; |
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 29 | } |
Arpit Singh | 61f5e14 | 2023-07-27 14:48:30 +0530 | [diff] [blame] | 30 | leaf postal-code { |
31 | type string; | ||||
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 32 | description |
Arpit Singh | 61f5e14 | 2023-07-27 14:48:30 +0530 | [diff] [blame] | 33 | "Postal code of store"; |
Rudrangi Anupriya | ad61e28 | 2023-07-17 20:20:34 +0530 | [diff] [blame] | 34 | } |
35 | } | ||||
36 | |||||
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 37 | container bookstore { |
38 | |||||
ToineSiebelink | e731118 | 2020-11-10 16:32:50 +0000 | [diff] [blame] | 39 | leaf bookstore-name { |
40 | type string; | ||||
41 | } | ||||
42 | |||||
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 43 | list categories { |
44 | |||||
ToineSiebelink | e731118 | 2020-11-10 16:32:50 +0000 | [diff] [blame] | 45 | key "code"; |
46 | |||||
47 | leaf code { | ||||
48 | type string; | ||||
49 | } | ||||
ToineSiebelink | 79ade5d | 2020-10-01 14:43:49 +0100 | [diff] [blame] | 50 | |
51 | leaf name { | ||||
52 | type string; | ||||
53 | } | ||||
54 | |||||
55 | list books { | ||||
56 | key title; | ||||
57 | |||||
58 | leaf title { | ||||
59 | type string; | ||||
60 | } | ||||
61 | leaf lang { | ||||
62 | type string; | ||||
63 | } | ||||
64 | leaf-list authors { | ||||
65 | type string; | ||||
66 | } | ||||
67 | leaf pub_year { | ||||
68 | type year; | ||||
69 | } | ||||
70 | leaf price { | ||||
71 | type uint64; | ||||
72 | } | ||||
73 | } | ||||
74 | } | ||||
75 | } | ||||
76 | } |