* @since 1.0.0 */ protected static array $columns = [ 'qa_answer_id' => ['name' => 'qa_answer_id', 'type' => 'int', 'internal' => 'id'], 'qa_answer_answer_raw' => ['name' => 'qa_answer_answer_raw', 'type' => 'string', 'internal' => 'answerRaw'], 'qa_answer_answer' => ['name' => 'qa_answer_answer', 'type' => 'string', 'internal' => 'answer'], 'qa_answer_question' => ['name' => 'qa_answer_question', 'type' => 'int', 'internal' => 'question'], 'qa_answer_status' => ['name' => 'qa_answer_status', 'type' => 'int', 'internal' => 'status'], 'qa_answer_accepted' => ['name' => 'qa_answer_accepted', 'type' => 'bool', 'internal' => 'isAccepted'], 'qa_answer_created_by' => ['name' => 'qa_answer_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], 'qa_answer_created_at' => ['name' => 'qa_answer_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], ]; /** * Belongs to. * * @var array * @since 1.0.0 */ protected static array $belongsTo = [ 'createdBy' => [ 'mapper' => AccountMapper::class, 'external' => 'qa_answer_created_by', ], 'question' => [ 'mapper' => QAQuestionMapper::class, 'external' => 'qa_answer_question', ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ protected static string $table = 'qa_answer'; /** * Created at. * * @var string * @since 1.0.0 */ protected static string $createdAt = 'qa_answer_created_at'; /** * Primary field name. * * @var string * @since 1.0.0 */ protected static string $primaryField = 'qa_answer_id'; }