import {Field, FieldType, Model} from '@extollo/lib'

export class FeedPost extends Model<FeedPost> {
    protected static table = 'feed_posts'
    protected static key = 'feed_post_id'

    @Field(FieldType.varchar, 'feed_post_id')
    public readonly feedPostId?: string

    @Field(FieldType.timestamp, 'posted_at')
    public postedAt: Date = new Date()

    @Field(FieldType.varchar)
    public tag!: string

    @Field(FieldType.bool)
    public visible = false

    @Field(FieldType.text)
    public body = ''
}
