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.
28 lines
708 B
28 lines
708 B
import {Field, FieldType, Injectable, Model} from '@extollo/lib'
|
|
|
|
/**
|
|
* ContactSubmission Model
|
|
* -----------------------------------
|
|
* A message submitted via the contact form on my website.
|
|
*/
|
|
@Injectable()
|
|
export class ContactSubmission extends Model<ContactSubmission> {
|
|
protected static table = 'contact_submissions'
|
|
protected static key = 'contact_submission_id'
|
|
|
|
@Field(FieldType.serial, 'contact_submission_id')
|
|
protected id?: number
|
|
|
|
@Field(FieldType.varchar)
|
|
public email!: string
|
|
|
|
@Field(FieldType.varchar)
|
|
public name!: string
|
|
|
|
@Field(FieldType.text)
|
|
public message!: string
|
|
|
|
@Field(FieldType.timestamp, 'sent_at')
|
|
public sentAt = new Date()
|
|
}
|