Skip to content
Snippets Groups Projects
Verified Commit 6f668e71 authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Zmena attributu

parent c3784c10
Branches
No related tags found
No related merge requests found
......@@ -18,10 +18,9 @@ __PACKAGE__->add_columns(
},
qw(
datetime
is_archived
deleted
user_id
type
state
content
link
related_post_id
......@@ -32,4 +31,18 @@ __PACKAGE__->set_primary_key('id');
1;
sub format {
my $self = shift;
my $announcement = {
id => $self->id,
datetime => $self->datetime,
type => $self->type,
content => $self->content,
link => $self->link,
related_post_id => $self->related_post_id,
};
return $announcement;
}
create table "announcements" (
"id" integer not null default nextval('uid_seq'),
"datetime" timestamp(0) not null default now(),
"is_archived" bool not null default 'false',
"deleted" timestamp(0),
"user_id" integer,
"type" integer not null,
"content" text,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment