backend api, swagger, tooling, frontend skeleton

This commit is contained in:
2026-01-21 22:05:02 +01:00
parent a9d1ad79ca
commit 88624f3bed
107 changed files with 34393 additions and 6 deletions

View File

@@ -4,6 +4,8 @@ import (
"time"
"entgo.io/ent"
"entgo.io/ent/dialect/entsql"
"entgo.io/ent/schema"
"entgo.io/ent/schema/edge"
"entgo.io/ent/schema/field"
"github.com/google/uuid"
@@ -48,12 +50,20 @@ func (PieceJointe) Fields() []ent.Field {
}
}
// Annotations pour le nom de table.
func (PieceJointe) Annotations() []schema.Annotation {
return []schema.Annotation{
entsql.Annotation{Table: "piece_jointe"},
}
}
// Edges de l'entite PieceJointe.
func (PieceJointe) Edges() []ent.Edge {
return []ent.Edge{
edge.From("objet", Objet.Type).
Ref("pieces_jointes").
Unique().
Field("objet_id"),
Field("objet_id").
Required(),
}
}