k4st
public php v1 · immutable<?php/* $header */if(!defined('IN_VALKYRIE')) { exit;}class PostsModel extends ModelDefinition { public function init() { $this->setTable('posts', 'InnoDB'); $this->hasPrimaryKey('post_id'); $this->hasField('post_id', 'int(10)')->increment(); $this->hasField('name', 'varchar(255)')->auto(''); $this->hasMany('tags')->through('post_tags'); // links to tags }}