Commit | Line | Data |
772c89c1 |
1 | package # hide from PAUSE |
2 | RestrictByUserTest::Schema::Notes; |
3 | |
4 | use base 'DBIx::Class'; |
5 | |
6 | __PACKAGE__->load_components('Core'); |
7 | __PACKAGE__->table('notes_test'); |
8 | __PACKAGE__->add_columns( |
9 | 'id' => { |
10 | data_type => 'int', |
11 | is_nullable => 0, |
12 | is_auto_increment => 1, |
13 | }, |
14 | 'user_id' => { |
15 | data_type => 'int', |
16 | }, |
17 | 'name' => { |
18 | data_type => 'varchar', |
19 | size => 100, |
20 | } |
21 | ); |
22 | |
23 | __PACKAGE__->set_primary_key('id'); |
24 | __PACKAGE__->belongs_to("user", "Users", { id => "user_id" }); |
25 | |
26 | 1; |