| 1234567891011121314151617181920212223242526272829 |
- using InvercargillSql.Orm;
- /**
- * Order entity representing an order in the e-commerce system.
- */
- public class Order : Object {
- public int64 id { get; set; }
- public int64 user_id { get; set; }
- public int64 product_id { get; set; }
- public int64 quantity { get; set; }
- public double total { get; set; }
- public string status { get; set; }
- public DateTime? created_at { get; set; }
-
- public Order() {
- status = "";
- }
-
- public static void configure_mapper(EntityMapperBuilder<Order> b) {
- b.table("orders")
- .column<int64?>("id", o => o.id, (o, v) => o.id = v)
- .column<int64?>("user_id", o => o.user_id, (o, v) => o.user_id = v)
- .column<int64?>("product_id", o => o.product_id, (o, v) => o.product_id = v)
- .column<int64?>("quantity", o => o.quantity, (o, v) => o.quantity = v)
- .column<double?>("total", o => o.total, (o, v) => o.total = v)
- .column<string>("status", o => o.status, (o, v) => o.status = v)
- .column<DateTime?>("created_at", o => o.created_at, (o, v) => o.created_at = v);
- }
- }
|