Parent Directory | Revision Log
Simple object schema for room reservation example application
1 | package App::RoomReservation::Reservation; |
2 | use Moose; |
3 | |
4 | extends 'Frey'; |
5 | with 'Frey::Web'; |
6 | #with 'Frey::Storage'; |
7 | |
8 | has ime => ( |
9 | is => 'rw', |
10 | isa => 'Str', |
11 | required => 1, |
12 | ); |
13 | |
14 | has prezime => ( |
15 | is => 'rw', |
16 | isa => 'Str', |
17 | required => 1, |
18 | ); |
19 | |
20 | has institucija => ( |
21 | is => 'rw', |
22 | isa => 'Str', |
23 | required => 1, |
24 | ); |
25 | |
26 | has zanimanje => ( |
27 | is => 'rw', |
28 | isa => 'Str', |
29 | required => 1, |
30 | ); |
31 | |
32 | has grad => ( |
33 | is => 'rw', |
34 | isa => 'Str', |
35 | required => 1, |
36 | ); |
37 | |
38 | has drzava => ( |
39 | is => 'rw', |
40 | isa => 'Str', |
41 | required => 1, |
42 | ); |
43 | |
44 | has telefon => ( |
45 | is => 'rw', |
46 | isa => 'Str', |
47 | required => 1, |
48 | ); |
49 | |
50 | has mobitel => ( |
51 | is => 'rw', |
52 | isa => 'Str', |
53 | required => 1, |
54 | ); |
55 | |
56 | has email => ( |
57 | is => 'rw', |
58 | isa => 'Str', |
59 | required => 1, |
60 | ); |
61 | |
62 | has email_verify => ( |
63 | is => 'rw', |
64 | isa => 'Str', |
65 | required => 1, |
66 | ); |
67 | |
68 | has _confirmed => ( |
69 | is => 'rw', |
70 | isa => 'Bool', |
71 | required => 1, |
72 | default => sub { 0 }, |
73 | ); |
74 | |
75 | sub as_markup { |
76 | my ($self) = @_; |
77 | |
78 | $self->ime; |
79 | } |
80 | |
81 | 1; |
ViewVC Help | |
Powered by ViewVC 1.1.26 |