Skip to content

Map table columns to model properties #540

Description

@Tigrov

Proposed new feature or change

CREATE TABLE "user" (
  "id" INT PRIMARY KEY,
  "first_name" VARCHAR NOT NULL,
  "last_name" VARCHAR NOT NULL,
  "created_at" INT NOT NULL,
);
final class User extends ActiveRecord
{
    public int $id;
    #[Column('first_name')]
    public string $firstName;
    #[Column('last_name')]
    public string $lastName;
    #[Column('created_at')]
    public string $createdAt;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions