21 lines
578 B
Zig
21 lines
578 B
Zig
|
const std = @import("std");
|
||
|
const pgmql = @import("pgmql");
|
||
|
const _example = @import("../example.zig");
|
||
|
|
||
|
pub const AccountModel = pgmql.Model{
|
||
|
.table = "accounts",
|
||
|
.primaryKey = .{ .single = "id" },
|
||
|
|
||
|
.definition = struct {
|
||
|
pub const id = pgmql.types.Serial{};
|
||
|
pub const createdAt = pgmql.types.DateTime{};
|
||
|
pub const updatedAt = pgmql.types.DateTime{};
|
||
|
pub const name = pgmql.types.String{};
|
||
|
pub const role = pgmql.types.String{};
|
||
|
},
|
||
|
|
||
|
//.crudPolicy = _example.builder.policies.crud(.{ .anyAuthenticated = true }),
|
||
|
};
|
||
|
|
||
|
pub const Account = AccountModel.structure();
|