You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
795 B
34 lines
795 B
import {Field, FieldType, Injectable, Model} from '@extollo/lib'
|
|
|
|
/**
|
|
* Snippet Model
|
|
* -----------------------------------
|
|
* A code snippet or gist for display on the website.
|
|
*/
|
|
@Injectable()
|
|
export class Snippet extends Model<Snippet> {
|
|
protected static table = 'snippets'
|
|
protected static key = 'snippet_id'
|
|
|
|
@Field(FieldType.serial, 'snippet_id')
|
|
public snippetId?: number
|
|
|
|
@Field(FieldType.varchar)
|
|
public slug!: string
|
|
|
|
@Field(FieldType.bool, 'users_only')
|
|
public usersOnly = false
|
|
|
|
@Field(FieldType.bool, 'single_access_only')
|
|
public singleAccessOnly = false
|
|
|
|
@Field(FieldType.varchar, 'access_key')
|
|
public accessKey?: string
|
|
|
|
@Field(FieldType.varchar)
|
|
public syntax?: string
|
|
|
|
@Field(FieldType.text)
|
|
public body = ''
|
|
}
|