codegenta 0.0.8

A model code generator from database table using rustorm ORM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
//! WARNING: This file is generated, derived from table bazaar.product, DO NOT EDIT

use chrono::datetime::DateTime;
use chrono::offset::utc::UTC;
use gen::column;
use gen::schema;
use gen::table;
use rustc_serialize::json::Json;
use rustc_serialize::json::ToJson;
use rustorm::dao::Dao;
use rustorm::dao::IsDao;
use rustorm::dao::Type;
use rustorm::dao::Value;
use rustorm::query::Operand;
use rustorm::table::Column;
use rustorm::table::Foreign;
use rustorm::table::IsTable;
use rustorm::table::Table;
use uuid::Uuid;
use gen::bazaar::Category;
use gen::bazaar::Photo;
use gen::bazaar::ProductAvailability;
use gen::bazaar::Review;
use gen::bazaar::Users;
use gen::payment::Currency;



///
/// This will be exposed as an @Api, including @Table(users, category, product_availability, photo)

///
#[derive(RustcEncodable)]
#[derive(Debug, Clone)]
pub struct Product {
    /// primary
    /// default: 'uuid_generate_v4()'
    /// not nullable 
    /// db data type: uuid
    pub product_id: Uuid,
    /// barcode if scanning the product, conflict can happen, expect to return matching list of products using the barcode
    /// db data type: character varying
    pub barcode: Option<String>,
    /// db data type: uuid
    pub currency_id: Option<Uuid>,
    /// {color:"red",
    /// dimension:"10x20x30",
    /// dimensionUnit:"mm",
    /// weight:"4",
    /// weightUnit:"kg"
    /// }
    /// db data type: json
    pub info: Option<Json>,
    /// default: 'false'
    /// db data type: boolean
    pub is_service: Option<bool>,
    /// Whom this product belongs, since created_by can be someone else create the product list in behalf of the owner of the product
    /// db data type: uuid
    pub owner_id: Option<Uuid>,
    /// db data type: uuid
    pub parent_product_id: Option<Uuid>,
    /// db data type: double precision
    pub price: Option<f64>,
    /// @Sequence can be used to do alternate ordering of the values, when alphetical or time can not be used
    /// db data type: integer
    pub seq_no: Option<i32>,
    /// db data type: json
    pub tags: Option<Json>,
    /// db data type: character varying
    pub unit: Option<String>,
    /// Applicable to services, usually services has an upfront fee
    /// default: '0.00'
    /// db data type: double precision
    pub upfront_fee: Option<f64>,
    /// default: 'false'
    /// db data type: boolean
    pub use_parent_price: Option<bool>,
    /// @Active
    /// default: 'true'
    /// not nullable 
    /// --inherited-- 
    /// db data type: boolean
    pub active: bool,
    /// @Value(users.client_id) The client_id of the user creating this records
    /// --inherited-- 
    /// db data type: uuid
    pub client_id: Option<Uuid>,
    /// default: 'now()'
    /// not nullable 
    /// --inherited-- 
    /// db data type: timestamp with time zone
    pub created: DateTime<UTC>,
    /// @Value(users.user_id)
    /// --inherited-- 
    /// db data type: uuid
    pub created_by: Option<Uuid>,
    /// @DisplayLength(100) When building a UI for this field
    /// @MaxLength(200) Do not go over 200 character on this one
    /// --inherited-- 
    /// db data type: character varying
    pub description: Option<String>,
    /// --inherited-- 
    /// db data type: text
    pub help: Option<String>,
    /// This is @Required it has @DisplayLength(50) - 50 character in display length a @MinLength(1) and @MaxLength(100) - Do not go over 100 characters or else the system will throw a ValueTooLong exception
    /// can also be express with @Length(1-100)
    /// --inherited-- 
    /// db data type: character varying
    pub name: Option<String>,
    /// @Value(users.user_id) , which means the value will be set with the users.user_id value
    /// 
    /// @Where(users.active=true)
    /// --inherited-- 
    /// db data type: uuid
    pub organization_id: Option<Uuid>,
    /// --inherited-- 
    /// db data type: double precision
    pub priority: Option<f64>,
    /// default: 'now()'
    /// not nullable 
    /// --inherited-- 
    /// db data type: timestamp with time zone
    pub updated: DateTime<UTC>,
    /// @Value(users.user_id)
    /// --inherited-- 
    /// db data type: uuid
    pub updated_by: Option<Uuid>,

    /// has one
    pub owner: Option<Users>,
    /// has one
    pub currency: Option<Currency>,
    /// has one, extension table
    pub availability: Option<Box<ProductAvailability>>,
    /// has many, indirect
    pub category: Vec<Category>,
    /// has many, indirect
    pub photo: Vec<Photo>,
    /// has many, indirect
    pub review: Vec<Review>,
}



impl IsDao for Product {
    fn from_dao(dao: &Dao) -> Self {
        Product {
            organization_id: dao.get_opt(column::organization_id),
            client_id: dao.get_opt(column::client_id),
            created: dao.get(column::created),
            created_by: dao.get_opt(column::created_by),
            updated: dao.get(column::updated),
            updated_by: dao.get_opt(column::updated_by),
            priority: dao.get_opt(column::priority),
            name: dao.get_opt(column::name),
            description: dao.get_opt(column::description),
            help: dao.get_opt(column::help),
            active: dao.get(column::active),
            product_id: dao.get(column::product_id),
            parent_product_id: dao.get_opt(column::parent_product_id),
            is_service: dao.get_opt(column::is_service),
            price: dao.get_opt(column::price),
            use_parent_price: dao.get_opt(column::use_parent_price),
            unit: dao.get_opt(column::unit),
            tags: dao.get_opt(column::tags),
            info: dao.get_opt(column::info),
            seq_no: dao.get_opt(column::seq_no),
            upfront_fee: dao.get_opt(column::upfront_fee),
            barcode: dao.get_opt(column::barcode),
            owner_id: dao.get_opt(column::owner_id),
            currency_id: dao.get_opt(column::currency_id),
            owner: None,
            currency: None,
            availability: None,
            category: vec![],
            photo: vec![],
            review: vec![],
        }
    }

    fn to_dao(&self) -> Dao {
        let mut dao = Dao::new();
        match self.organization_id {
            Some(ref _value) => dao.set(column::organization_id, _value),
            None => dao.set_null(column::organization_id)
        }
        match self.client_id {
            Some(ref _value) => dao.set(column::client_id, _value),
            None => dao.set_null(column::client_id)
        }
        dao.set(column::created, &self.created);
        match self.created_by {
            Some(ref _value) => dao.set(column::created_by, _value),
            None => dao.set_null(column::created_by)
        }
        dao.set(column::updated, &self.updated);
        match self.updated_by {
            Some(ref _value) => dao.set(column::updated_by, _value),
            None => dao.set_null(column::updated_by)
        }
        match self.priority {
            Some(ref _value) => dao.set(column::priority, _value),
            None => dao.set_null(column::priority)
        }
        match self.name {
            Some(ref _value) => dao.set(column::name, _value),
            None => dao.set_null(column::name)
        }
        match self.description {
            Some(ref _value) => dao.set(column::description, _value),
            None => dao.set_null(column::description)
        }
        match self.help {
            Some(ref _value) => dao.set(column::help, _value),
            None => dao.set_null(column::help)
        }
        dao.set(column::active, &self.active);
        dao.set(column::product_id, &self.product_id);
        match self.parent_product_id {
            Some(ref _value) => dao.set(column::parent_product_id, _value),
            None => dao.set_null(column::parent_product_id)
        }
        match self.is_service {
            Some(ref _value) => dao.set(column::is_service, _value),
            None => dao.set_null(column::is_service)
        }
        match self.price {
            Some(ref _value) => dao.set(column::price, _value),
            None => dao.set_null(column::price)
        }
        match self.use_parent_price {
            Some(ref _value) => dao.set(column::use_parent_price, _value),
            None => dao.set_null(column::use_parent_price)
        }
        match self.unit {
            Some(ref _value) => dao.set(column::unit, _value),
            None => dao.set_null(column::unit)
        }
        match self.tags {
            Some(ref _value) => dao.set(column::tags, _value),
            None => dao.set_null(column::tags)
        }
        match self.info {
            Some(ref _value) => dao.set(column::info, _value),
            None => dao.set_null(column::info)
        }
        match self.seq_no {
            Some(ref _value) => dao.set(column::seq_no, _value),
            None => dao.set_null(column::seq_no)
        }
        match self.upfront_fee {
            Some(ref _value) => dao.set(column::upfront_fee, _value),
            None => dao.set_null(column::upfront_fee)
        }
        match self.barcode {
            Some(ref _value) => dao.set(column::barcode, _value),
            None => dao.set_null(column::barcode)
        }
        match self.owner_id {
            Some(ref _value) => dao.set(column::owner_id, _value),
            None => dao.set_null(column::owner_id)
        }
        match self.currency_id {
            Some(ref _value) => dao.set(column::currency_id, _value),
            None => dao.set_null(column::currency_id)
        }
        dao
    }
}

impl ToJson for Product {

    fn to_json(&self) -> Json {
        self.to_dao().to_json()
    }
}

impl Default for Product {

    fn default() -> Self {
        Product{
            organization_id: Default::default(),
            client_id: Default::default(),
            created: UTC::now(),
            created_by: Default::default(),
            updated: UTC::now(),
            updated_by: Default::default(),
            priority: Default::default(),
            name: Default::default(),
            description: Default::default(),
            help: Default::default(),
            active: Default::default(),
            product_id: Default::default(),
            parent_product_id: Default::default(),
            is_service: Default::default(),
            price: Default::default(),
            use_parent_price: Default::default(),
            unit: Default::default(),
            tags: Default::default(),
            info: Default::default(),
            seq_no: Default::default(),
            upfront_fee: Default::default(),
            barcode: Default::default(),
            owner_id: Default::default(),
            currency_id: Default::default(),
            owner: Default::default(),
            currency: Default::default(),
            availability: Default::default(),
            category: Default::default(),
            photo: Default::default(),
            review: Default::default(),
        }
    }
}

impl IsTable for Product {

    fn table() -> Table {
        Table {
            schema: Some(schema::bazaar.to_owned()),
            name: table::product.to_owned(),
            parent_table: Some(table::record.to_owned()),
            sub_table: vec![],
            comment: Some("This will be exposed as an @Api, including @Table(users, category, product_availability, photo)".to_owned()),
            columns: vec![
                Column {
                    name: column::organization_id.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: Some("@Value(users.user_id) , which means the value will be set with the users.user_id value\n\n@Where(users.active=true)".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::client_id.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: Some("@Value(users.client_id) The client_id of the user creating this records".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::created.to_owned(),
                    data_type: Type::DateTime,
                    db_data_type: "timestamp with time zone".to_owned(),
                    is_primary: false, is_unique: false, not_null: true, is_inherited: true,
                    default: Some(Operand::Value(Value::String("'now()'".to_owned()))),
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::created_by.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: Some("@Value(users.user_id)".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::updated.to_owned(),
                    data_type: Type::DateTime,
                    db_data_type: "timestamp with time zone".to_owned(),
                    is_primary: false, is_unique: false, not_null: true, is_inherited: true,
                    default: Some(Operand::Value(Value::String("'now()'".to_owned()))),
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::updated_by.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: Some("@Value(users.user_id)".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::priority.to_owned(),
                    data_type: Type::F64,
                    db_data_type: "double precision".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::name.to_owned(),
                    data_type: Type::String,
                    db_data_type: "character varying".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: Some("This is @Required it has @DisplayLength(50) - 50 character in display length a @MinLength(1) and @MaxLength(100) - Do not go over 100 characters or else the system will throw a ValueTooLong exception\ncan also be express with @Length(1-100)".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::description.to_owned(),
                    data_type: Type::String,
                    db_data_type: "character varying".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: Some("@DisplayLength(100) When building a UI for this field\n@MaxLength(200) Do not go over 200 character on this one".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::help.to_owned(),
                    data_type: Type::String,
                    db_data_type: "text".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: true,
                    default: None,
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::active.to_owned(),
                    data_type: Type::Bool,
                    db_data_type: "boolean".to_owned(),
                    is_primary: false, is_unique: false, not_null: true, is_inherited: true,
                    default: Some(Operand::Value(Value::String("'true'".to_owned()))),
                    comment: Some("@Active".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::product_id.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: true, is_unique: false, not_null: true, is_inherited: false,
                    default: Some(Operand::Value(Value::String("'uuid_generate_v4()'".to_owned()))),
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::parent_product_id.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::is_service.to_owned(),
                    data_type: Type::Bool,
                    db_data_type: "boolean".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: Some(Operand::Value(Value::String("'false'".to_owned()))),
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::price.to_owned(),
                    data_type: Type::F64,
                    db_data_type: "double precision".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::use_parent_price.to_owned(),
                    data_type: Type::Bool,
                    db_data_type: "boolean".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: Some(Operand::Value(Value::String("'false'".to_owned()))),
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::unit.to_owned(),
                    data_type: Type::String,
                    db_data_type: "character varying".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::tags.to_owned(),
                    data_type: Type::Json,
                    db_data_type: "json".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: None,
                    foreign: None,
                },
                Column {
                    name: column::info.to_owned(),
                    data_type: Type::Json,
                    db_data_type: "json".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: Some("{color:\"red\",\ndimension:\"10x20x30\",\ndimensionUnit:\"mm\",\nweight:\"4\",\nweightUnit:\"kg\"\n}".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::seq_no.to_owned(),
                    data_type: Type::I32,
                    db_data_type: "integer".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: Some("@Sequence can be used to do alternate ordering of the values, when alphetical or time can not be used".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::upfront_fee.to_owned(),
                    data_type: Type::F64,
                    db_data_type: "double precision".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: Some(Operand::Value(Value::String("'0.00'".to_owned()))),
                    comment: Some("Applicable to services, usually services has an upfront fee".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::barcode.to_owned(),
                    data_type: Type::String,
                    db_data_type: "character varying".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: Some("barcode if scanning the product, conflict can happen, expect to return matching list of products using the barcode".to_owned()),
                    foreign: None,
                },
                Column {
                    name: column::owner_id.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: Some("Whom this product belongs, since created_by can be someone else create the product list in behalf of the owner of the product".to_owned()),
                    foreign: Some(
                        Foreign {
                            schema: Some("bazaar".to_owned()),
                            table: "users".to_owned(),
                            column: "user_id".to_owned(),
                        }),
                },
                Column {
                    name: column::currency_id.to_owned(),
                    data_type: Type::Uuid,
                    db_data_type: "uuid".to_owned(),
                    is_primary: false, is_unique: false, not_null: false, is_inherited: false,
                    default: None,
                    comment: None,
                    foreign: Some(
                        Foreign {
                            schema: Some("payment".to_owned()),
                            table: "currency".to_owned(),
                            column: "currency_id".to_owned(),
                        }),
                },
            ],
            is_view: false,
        }
    }
}
// Generated columns for easier development of dynamic queries without sacrificing wrong spelling of column names

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static organization_id: &'static str = "product.organization_id";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static client_id: &'static str = "product.client_id";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static created: &'static str = "product.created";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static created_by: &'static str = "product.created_by";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static updated: &'static str = "product.updated";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static updated_by: &'static str = "product.updated_by";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static priority: &'static str = "product.priority";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static name: &'static str = "product.name";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static description: &'static str = "product.description";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static help: &'static str = "product.help";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static active: &'static str = "product.active";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static product_id: &'static str = "product.product_id";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static parent_product_id: &'static str = "product.parent_product_id";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static is_service: &'static str = "product.is_service";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static price: &'static str = "product.price";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static use_parent_price: &'static str = "product.use_parent_price";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static unit: &'static str = "product.unit";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static tags: &'static str = "product.tags";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static info: &'static str = "product.info";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static seq_no: &'static str = "product.seq_no";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static upfront_fee: &'static str = "product.upfront_fee";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static barcode: &'static str = "product.barcode";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static owner_id: &'static str = "product.owner_id";

#[allow(non_upper_case_globals)]
#[allow(dead_code)]
pub static currency_id: &'static str = "product.currency_id";