/**
 * Example Post Model
 */
import { User } from '../Models/User.js';
import { Model } from '../../src/orm/Model.js';
export const PostConfig = {
    table: 'posts',
    fillable: ['title', 'content', 'user_id'],
    hidden: [],
    timestamps: true,
    casts: {
        published_at: 'datetime',
        is_published: 'boolean',
    },
};
/**
 * Post Model
 * Refactored to Functional Object pattern
 */
export const Post = Model.define(PostConfig, {
    /**
     * Get post's author
     */
    author(model) {
        return model.belongsTo(User);
    },
});
